|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This is an interface that needs to be implemented to receive and process the TL1Message from the TL1Agent. This is mainly used in asynchronous mode of message transfer. The TL1Session invokes the callback(...) method upon succesfully receiving the TL1Message from the TL1Agent.
If the request has been timed out, then callback will be invoked with
null message for the corresponding correlation tag of the request sent.
The implementation of this interface should be registered with TL1Session
as follows.
session.addTL1Client(TL1ClientImpl)where session is the instance of TL1Session and TL1ClientImpl is the implementation of this interface.
TL1Session.addTL1Client(com.adventnet.tl1.TL1Client),
TL1Session.removeTL1Client(com.adventnet.tl1.TL1Client),
TL1Session| Method Summary | |
void |
callback(TL1Session session,
java.lang.String responseString,
java.lang.String tag,
byte mesgType)
This method will be invoked whenever a message is received from the agent and parsing is disabled. |
boolean |
callback(TL1Session session,
TL1Message msg,
java.lang.String tag)
This method will be invoked whenever a TL1Message is received from the agent and parsed successfully. |
void |
processErrorMessage(TL1Session session,
java.lang.String errorMsg)
This method will be invoked, if the syntax of the message received from the agent is not compliant to TL1 standards. |
| Method Detail |
public boolean callback(TL1Session session,
TL1Message msg,
java.lang.String tag)
session - TL1Session instance.msg - TL1Message Received.tag - This tag is the Correlation Tag of the TL1AckMessage/
TL1ResponseMessage,if the msg is an instanceof TL1AckMessage/
TL1ResponseMessage
public void callback(TL1Session session,
java.lang.String responseString,
java.lang.String tag,
byte mesgType)
session - TL1Session instance.responseString - The raw/unparsed data received in the form of a
String.tag - This tag is the Correlation Tag of the responseString which
could be either an acknowledgement/response message.
message
mesgType - Type of message as byte.
This byte constant can be any one of the four bytes, viz
TL1API.INPUT_MESSAGE ,
TL1API.ACK_MESSAGE ,
TL1API.RESPONSE_MESSAGE and
TL1API.AUTONOMOUS_MESSAGE.
If it is an invalid message this byte constant value is -1.
public void processErrorMessage(TL1Session session,
java.lang.String errorMsg)
session - TL1Session instance.errorMsg - Error String.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||