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(EPR epr)
          Create a new call, whose To field is set to the supplied EPR.
 
Method Summary
 void copy(Call from)
          Copy the instance specified.
 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 toString()
           
 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(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()
          throws java.net.URISyntaxException
Returns:
the To field.
Throws:
java.net.URISyntaxException - thrown if the address is invalid.

setFrom

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

Parameters:
from - the value of the field.

getFrom

public EPR getFrom()
            throws java.net.URISyntaxException
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()
               throws java.net.URISyntaxException
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()
               throws java.net.URISyntaxException
Returns:
the FaultTo field.
Throws:
java.net.URISyntaxException - thrown if the address is invalid.

setRelatesTo

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

Parameters:
uri - the value to set.

getRelatesTo

public java.net.URI getRelatesTo()
                          throws java.net.URISyntaxException
Returns:
the RelatesTo field.
Throws:
java.net.URISyntaxException - thrown if the field is invalid.

setAction

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

Parameters:
uri - the value to set.

getAction

public java.net.URI getAction()
                       throws java.net.URISyntaxException
Returns:
the Action field.
Throws:
java.net.URISyntaxException - thrown if the field is invalid.

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()
                          throws java.net.URISyntaxException
Returns:
the MessageID field.
Throws:
java.net.URISyntaxException - thrown if the value is invalid.

copy

public void copy(Call from)
Copy the instance specified.

Parameters:
from - the instance to copy.

toString

public java.lang.String toString()
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.