|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object context.arch.comm.clients.IndependentCommunication
This method is used to encapsulate all information used for an independent communication. Before openning the communication, it contains the request to send When the communication is closed, it contains the reply of the request and/or the exceptions occured during it. At the end, this object is contained in an IndependentCommunications object that allows to group several IndependentCommunication objects. An IndependentCommunication object is added to an IndependentCommunications object if the clients that initialized the communication requires a response.
BaseObject
,
context.arch.comm.IndependentCommunications
,
ClientsPool
,
Client
Field Summary | |
protected java.util.Vector |
exceptions
A vector of exceptions occured during the communication. |
protected java.lang.String |
objectIdentification
Just to determine the class (baseobject, widget... |
java.lang.Object |
objectToStore
An object to store something to keep... |
protected java.lang.Object |
reply
The reply of the request. |
protected RequestObject |
request
The Request object containing the DataObject to send, the port and the host to send to. |
protected boolean |
responseRequired
This boolean says if the client wants to get the reply. |
Constructor Summary | |
IndependentCommunication(RequestObject request)
Creates a new IndependentCommunication with the given RequestObject. |
|
IndependentCommunication(RequestObject request,
boolean responseRequired)
|
|
IndependentCommunication(RequestObject request,
DataObject reply,
java.util.Vector exceptions,
boolean responseRequired)
The generic IndependentCommunication constructor, that takes the request, reply, exceptions given. |
Method Summary | |
void |
addException(java.lang.Exception e)
Adds an exception to the exceptions of this object |
void |
decodeReply(BaseObject baseObject)
|
DataObject |
getDecodedReply()
Returns the DataObject reply |
java.util.Vector |
getExceptions()
Returns the exceptions |
RequestData |
getNonDecodedReply()
Returns the non decoded RequestData reply |
java.lang.Object |
getObjectToStore()
|
RequestObject |
getRequest()
Returns the RequestObject |
boolean |
getResponseRequired()
Tests if the communication response need to be sent to the client that initialized it. |
java.lang.String |
getSenderClassId()
|
boolean |
isThereTheException(java.lang.Exception exception)
Tests if exception is contained in the exceptions of this object |
void |
setDecodedReply(DataObject reply)
Sets the reply |
void |
setExceptions(java.util.Vector e)
Sets the exceptions object |
void |
setNonDecodedReply(RequestData reply)
Sets the reply |
void |
setObjectToStore(java.lang.Object object)
|
void |
setRequest(RequestObject request)
Sets the request object |
void |
setResponseRequired(boolean responseRequired)
Set the response required condition |
void |
setSenderClassId(java.lang.String id)
|
boolean |
thereAreExceptions()
Tests if some exceptions occured during the communication |
java.lang.String |
toString()
Returns a printable version of this object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected RequestObject request
context.arch.util.RequestObject
protected java.lang.Object reply
protected java.util.Vector exceptions
protected boolean responseRequired
protected java.lang.String objectIdentification
public java.lang.Object objectToStore
Constructor Detail |
public IndependentCommunication(RequestObject request, DataObject reply, java.util.Vector exceptions, boolean responseRequired)
request
- The RequestObject containing the requestreply
- The reply of the requestexceptions
- The vector of exceptionsresponseRequired
- When set to false, the response is put int the
specified IndependentCommunications object, but the base object
handleIndependentReply is not called. When set to false, the method is
called.public IndependentCommunication(RequestObject request)
request
- The RequestObject containing the requestpublic IndependentCommunication(RequestObject request, boolean responseRequired)
Method Detail |
public RequestObject getRequest()
public void setRequest(RequestObject request)
request
- The RequestObjectpublic DataObject getDecodedReply()
public RequestData getNonDecodedReply()
public void setNonDecodedReply(RequestData reply)
reply
- The DataObjectpublic void setDecodedReply(DataObject reply)
reply
- The DataObjectpublic void decodeReply(BaseObject baseObject)
public boolean getResponseRequired()
public void setResponseRequired(boolean responseRequired)
responseRequired
- public boolean thereAreExceptions()
public java.util.Vector getExceptions()
public void addException(java.lang.Exception e)
e
- The Exception objectpublic void setExceptions(java.util.Vector e)
e
- The Vector of exceptionspublic boolean isThereTheException(java.lang.Exception exception)
public java.lang.String getSenderClassId()
public void setSenderClassId(java.lang.String id)
public java.lang.Object getObjectToStore()
public void setObjectToStore(java.lang.Object object)
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |