org.jboss.soa.esb.addressing
Class Call

java.lang.Object
  extended by org.jboss.soa.esb.addressing.Call

public class Call
extends java.lang.Object

Represents an interaction pattern for a specific message exchange. When sending a message the sender application can specify where errors are to be returned, where responses are to go, along with other interaction information. A call represents an exchange pattern for this message. It is built up as the message flows through the ESB and identifies where the message should go, along with any routing information for faults, replies etc. To: the destination. MANDATORY. From: the sender. OPTIONAL. If not defined, then the sender MAY be inferred from the transport. ReplyTo: the destination for any response. OPTIONAL. FaultTo: the destination for any error message. OPTIONAL. RelatesTo: used to indicate that this message is related to another. OPTIONAL. Action: used by the sender to indicate the semantics of the message. Must be unique. MANDATORY. MessageID: used to uniquely identify this message. OPTIONAL.

Author:
marklittle

Constructor Summary
Call()
          Create a new (empty) call.
Call(Call copy)
          Copy constructor.
Call(EPR epr)
          Create a new call, whose To field is set to the supplied EPR.
 
Method Summary
 void copy(Call from)
          Deprecated. use the copy constructor.
 boolean empty()
           
 java.net.URI getAction()
           
 EPR getFaultTo()
           
 EPR getFrom()
           
 java.net.URI getMessageID()
           
 java.net.URI getRelatesTo()
           
 EPR getReplyTo()
           
 EPR getTo()
           
 void setAction(java.net.URI uri)
          Set the Action field.
 void setFaultTo(EPR uri)
          Set the FaultTo field.
 void setFrom(EPR from)
          Set the From field.
 void setMessageID(java.net.URI uri)
          Set the MessageID for this instance.
 void setRelatesTo(java.net.URI uri)
          Set the RelatesTo field.
 void setReplyTo(EPR replyTo)
          Set the ReplyTo field.
 void setTo(EPR epr)
          Set the To field.
 java.lang.String stringForm()
          Prints the entire contents of the Call, even if most of the fields are null.
 java.lang.String toString()
          Print the content of this header, ignoring all null fields.
 boolean valid()
          This instance is valid if all mandatory elements are set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Call

public Call()
Create a new (empty) call.


Call

public Call(Call copy)
     throws java.net.URISyntaxException
Copy constructor.

Parameters:
copy -
Throws:
java.net.URISyntaxException

Call

public Call(EPR epr)
Create a new call, whose To field is set to the supplied EPR.

Parameters:
epr - the To field.
Method Detail

setTo

public void setTo(EPR epr)
Set the To field. Must not be null.

Parameters:
epr - the To field value.

getTo

public EPR getTo()
Returns:
the To field.

setFrom

public void setFrom(EPR from)
Set the From field. May be null.

Parameters:
from - the value of the field.

getFrom

public EPR getFrom()
Returns:
the From field.
Throws:
java.net.URISyntaxException - thrown if the address is invalid.

setReplyTo

public void setReplyTo(EPR replyTo)
Set the ReplyTo field. May be null.

Parameters:
replyTo - the value of the field.

getReplyTo

public EPR getReplyTo()
Returns:
the ReplyTo field.
Throws:
java.net.URISyntaxException - thrown if the address is invalid.

setFaultTo

public void setFaultTo(EPR uri)
Set the FaultTo field. May be null.

Parameters:
uri - the value of the field.

getFaultTo

public EPR getFaultTo()
Returns:
the FaultTo field.

setRelatesTo

public void setRelatesTo(java.net.URI uri)
Set the RelatesTo field.

Parameters:
uri - the value to set.

getRelatesTo

public java.net.URI getRelatesTo()
Returns:
the RelatesTo field.

setAction

public void setAction(java.net.URI uri)
Set the Action field.

Parameters:
uri - the value to set.

getAction

public java.net.URI getAction()
Returns:
the Action field.

setMessageID

public void setMessageID(java.net.URI uri)
Set the MessageID for this instance.

Parameters:
uri - the value to use.

getMessageID

public java.net.URI getMessageID()
Returns:
the MessageID field.

empty

public final boolean empty()

copy

public void copy(Call from)
Deprecated. use the copy constructor.

Copy the instance specified. This does a shallow (ptr) copy, so is not recommended.

Parameters:
from - the instance to copy.

stringForm

public java.lang.String stringForm()
Prints the entire contents of the Call, even if most of the fields are null.


toString

public java.lang.String toString()
Print the content of this header, ignoring all null fields.

Overrides:
toString in class java.lang.Object

valid

public boolean valid()
This instance is valid if all mandatory elements are set.

Returns:
true if all mandatory elements are set, false otherwise.