com.vii.brillien.kernel.axiom.transport
Interface Communication


public interface Communication

Data representation of an abstract Communication.


Field Summary
static String DEFAULT_FLOW_ID
           
static int TYPE_AGET
           
static int TYPE_DELEGATED_SET
           
static int TYPE_ERROR
           
static int TYPE_GET
           
static int TYPE_RESULT
           
static int TYPE_SET
           
static int TYPE_UNDEFINED
          According to the specification of Powerobject model, these constants defines the basic types of communication.
static int TYPE_UNKOWN
           
 
Method Summary
 Map<String,Object> acquireParameters(Map<String,Class> types)
          Maps the parameters of the given communication according to the give type mappings
<T> T
acquireResponse(Class<T> type)
          Maps the response object according to the given type mapping
<T> T
acquireResponse(Class<T> type, Map<String,Class> typeHint)
          Maps the response object according to the given type mapping
<T> T
acquireResponse(Class<T> type, String typeHint, Class hintClass)
          Maps the response object according to the given type mapping
<T> T
acquireResponse(Map<String,Class> typeHint)
          Maps the response object according to the given type mapping
<T> T
acquireResponse(String typeHint, Class hintClass)
          Maps the response object according to the given type mapping
 void addExtension(String key, Object value)
          Application or chanel specific extension can be added to a communication
 String getApiKey()
          Gets the api_key of the given Communication
 Integer getErrorCode()
          Gets the value of an error if this is a communication about an error
 Object getErrorValue()
          Gets the value of an error if this is a communication about an error
 Map<String,Object> getExtension()
          Gets the extension of the given Communication
<T> T
getExtension(String key)
          Retrieves application or chanel specific extension
 String getFlowID()
          Gets the id of the Flow where the given Communication appears in
 String getId()
          Gets the id of the given Communication
 Integer getMessageType()
          Gets the type of the given Communication
 String getOriginalId()
          Gets the id of a source ommunication which this communication represents a respond to
 Integer getOriginalType()
          Gets the type of a source ommunication which this communication represents a respond to
 Map<String,Object> getParameters()
          Retrieves the parameters of the given communication
 String getRecipient()
          Gets the recipient of the given Communication
 String getRecipientApiVersion()
          Gets the api version of the sender service to be called Optional attribute
 String getRedirectEntityName()
          Gets the recipient of the returning communication when this will be answered
 String getRedirectMessage()
          Gets the subject of the returning communication when this will be answered
 Long getRequestTime()
          Gets the creation time of the given Communication
<T> T
getResponse()
          Gets the response object if this communication represents a respond to previous one
 Long getResponseTime()
          Gets the creation time of the given Communication if it is a response
 String getSender()
          Gets the sender of the given Communication
 String getSenderApiVersion()
          Gets the api version of the sender service to be called Optional attribute
 Session getSession()
          Gets the session of the given Communication
 String getSubject()
          Gets the subject of the given Communication
 boolean hasExcension(String key)
          Tells whether the given excension exists
 boolean isAnswerTo(Communication msg)
           
 boolean isErrorCommunication()
          Tells whether this Communication is an error message or not
 void setApiKey(String apiKey)
          Sets the api_key of the given Communication
 void setErrorCode(Integer errorCode)
          Sets the code of an error if this is a communication about an error
 void setErrorValue(Object errorValue)
          Sets the value of an error if this is a communication about an error
 void setExtension(Map<String,Object> extension)
          Sets the extension of the given Communication
 void setFlowID(String flowID)
          Sets the id of the Flow where the given Communication appears in
 void setId(String id)
          Sets the id of the given Communication
 void setMessageType(Integer messageType)
          Sets the type of the given Communication
 void setOriginalId(String id)
          Sets the id of a source ommunication which this communication represents a respond to
 void setOriginalType(Integer originalType)
          Sets the type of a source ommunication which this communication represents a respond to
 void setParameters(Map<String,Object> parameters)
          Sets the id of the given Communication
 void setRecipient(String recipient)
          Sets the recipient of the given Communication
 void setRecipientApiVersion(String apiVersion)
          Sets the api version of the sender service to be called Optional attribute
 void setRedirectEntityName(String redirectEntityName)
          Sets the recipient of the returning communication when this will be answered
 void setRedirectMessage(String redirectMessage)
          Sets the subject of the returning communication when this will be answered
 void setRequestTime(Long requestTime)
          Sets the creation time of the given Communication
 void setResponse(Object response)
          Sets the response object if this communication represents a respond to previous one
 void setResponseTime(Long responseTime)
          Sets the creation time of the given Communication if it is a response
 void setSender(String sender)
          Sets the sender of the given Communication
 void setSenderApiVersion(String apiVersion)
          Sets the api version of the sender service to be called Optional attribute
 void setSession(Session session)
          Sets the session of the given Communication
 void setSubject(String subject)
          Sets the subject of the given Communication
 

Field Detail

TYPE_UNDEFINED

static final int TYPE_UNDEFINED
According to the specification of Powerobject model, these constants defines the basic types of communication.

See Also:
Constant Field Values

TYPE_UNKOWN

static final int TYPE_UNKOWN
See Also:
Constant Field Values

TYPE_GET

static final int TYPE_GET
See Also:
Constant Field Values

TYPE_AGET

static final int TYPE_AGET
See Also:
Constant Field Values

TYPE_SET

static final int TYPE_SET
See Also:
Constant Field Values

TYPE_DELEGATED_SET

static final int TYPE_DELEGATED_SET
See Also:
Constant Field Values

TYPE_RESULT

static final int TYPE_RESULT
See Also:
Constant Field Values

TYPE_ERROR

static final int TYPE_ERROR
See Also:
Constant Field Values

DEFAULT_FLOW_ID

static final String DEFAULT_FLOW_ID
See Also:
Constant Field Values
Method Detail

getId

String getId()
Gets the id of the given Communication


setId

void setId(String id)
Sets the id of the given Communication


getMessageType

Integer getMessageType()
Gets the type of the given Communication


setMessageType

void setMessageType(Integer messageType)
Sets the type of the given Communication


getSender

String getSender()
Gets the sender of the given Communication


setSender

void setSender(String sender)
Sets the sender of the given Communication


getRecipient

String getRecipient()
Gets the recipient of the given Communication


setRecipient

void setRecipient(String recipient)
Sets the recipient of the given Communication


getFlowID

String getFlowID()
Gets the id of the Flow where the given Communication appears in


setFlowID

void setFlowID(String flowID)
Sets the id of the Flow where the given Communication appears in


getSession

Session getSession()
Gets the session of the given Communication


setSession

void setSession(Session session)
Sets the session of the given Communication


getApiKey

String getApiKey()
Gets the api_key of the given Communication


setApiKey

void setApiKey(String apiKey)
Sets the api_key of the given Communication


getSenderApiVersion

String getSenderApiVersion()
Gets the api version of the sender service to be called Optional attribute


setSenderApiVersion

void setSenderApiVersion(String apiVersion)
Sets the api version of the sender service to be called Optional attribute


getRecipientApiVersion

String getRecipientApiVersion()
Gets the api version of the sender service to be called Optional attribute


setRecipientApiVersion

void setRecipientApiVersion(String apiVersion)
Sets the api version of the sender service to be called Optional attribute


getSubject

String getSubject()
Gets the subject of the given Communication


setSubject

void setSubject(String subject)
Sets the subject of the given Communication


getRedirectEntityName

String getRedirectEntityName()
Gets the recipient of the returning communication when this will be answered


setRedirectEntityName

void setRedirectEntityName(String redirectEntityName)
Sets the recipient of the returning communication when this will be answered


getRedirectMessage

String getRedirectMessage()
Gets the subject of the returning communication when this will be answered


setRedirectMessage

void setRedirectMessage(String redirectMessage)
Sets the subject of the returning communication when this will be answered


getRequestTime

Long getRequestTime()
Gets the creation time of the given Communication


setRequestTime

void setRequestTime(Long requestTime)
Sets the creation time of the given Communication


getResponseTime

Long getResponseTime()
Gets the creation time of the given Communication if it is a response


setResponseTime

void setResponseTime(Long responseTime)
Sets the creation time of the given Communication if it is a response


getParameters

Map<String,Object> getParameters()
Retrieves the parameters of the given communication


setParameters

void setParameters(Map<String,Object> parameters)
Sets the id of the given Communication


getExtension

Map<String,Object> getExtension()
Gets the extension of the given Communication


setExtension

void setExtension(Map<String,Object> extension)
Sets the extension of the given Communication


acquireParameters

Map<String,Object> acquireParameters(Map<String,Class> types)
                                     throws BrillienException
Maps the parameters of the given communication according to the give type mappings

Throws:
BrillienException

getResponse

<T> T getResponse()
Gets the response object if this communication represents a respond to previous one


setResponse

void setResponse(Object response)
Sets the response object if this communication represents a respond to previous one


acquireResponse

<T> T acquireResponse(Class<T> type)
                  throws BrillienException
Maps the response object according to the given type mapping

Throws:
BrillienException

acquireResponse

<T> T acquireResponse(Class<T> type,
                      Map<String,Class> typeHint)
                  throws BrillienException
Maps the response object according to the given type mapping

Throws:
BrillienException

acquireResponse

<T> T acquireResponse(Map<String,Class> typeHint)
                  throws BrillienException
Maps the response object according to the given type mapping

Throws:
BrillienException

acquireResponse

<T> T acquireResponse(String typeHint,
                      Class hintClass)
                  throws BrillienException
Maps the response object according to the given type mapping

Throws:
BrillienException

acquireResponse

<T> T acquireResponse(Class<T> type,
                      String typeHint,
                      Class hintClass)
                  throws BrillienException
Maps the response object according to the given type mapping

Throws:
BrillienException

getOriginalType

Integer getOriginalType()
Gets the type of a source ommunication which this communication represents a respond to


setOriginalType

void setOriginalType(Integer originalType)
Sets the type of a source ommunication which this communication represents a respond to


getOriginalId

String getOriginalId()
Gets the id of a source ommunication which this communication represents a respond to


setOriginalId

void setOriginalId(String id)
Sets the id of a source ommunication which this communication represents a respond to


getErrorCode

Integer getErrorCode()
Gets the value of an error if this is a communication about an error


setErrorCode

void setErrorCode(Integer errorCode)
Sets the code of an error if this is a communication about an error


getErrorValue

Object getErrorValue()
Gets the value of an error if this is a communication about an error


setErrorValue

void setErrorValue(Object errorValue)
Sets the value of an error if this is a communication about an error


isErrorCommunication

boolean isErrorCommunication()
Tells whether this Communication is an error message or not


isAnswerTo

boolean isAnswerTo(Communication msg)

addExtension

void addExtension(String key,
                  Object value)
Application or chanel specific extension can be added to a communication


hasExcension

boolean hasExcension(String key)
Tells whether the given excension exists


getExtension

<T> T getExtension(String key)
Retrieves application or chanel specific extension



Copyright © 2012. All Rights Reserved.