com.adventnet.adaptors.tl1
Class TL1Adaptor.MyTL1Agent

java.lang.Object
  extended by com.adventnet.agent.tl1.TL1Agent
      extended by com.adventnet.adaptors.tl1.TL1Adaptor.MyTL1Agent
All Implemented Interfaces:
TL1Client
Enclosing class:
TL1Adaptor

 class TL1Adaptor.MyTL1Agent
extends com.adventnet.agent.tl1.TL1Agent


Field Summary
 
Fields inherited from class com.adventnet.agent.tl1.TL1Agent
mainView, tl1Log, vendorName
 
Constructor Summary
TL1Adaptor.MyTL1Agent()
           
 
Method Summary
 void callback(TL1Session session, java.lang.String message, java.lang.String ctag, byte type)
          This method will be invoked whenever a message is received from the agent and parsing is disabled.
 boolean callback(TL1Session session, TL1Message message, java.lang.String ctag)
          This is implemented for sending response messages for the input message got through the session.
 void processErrorMessage(TL1Session session, java.lang.String err)
          This method will be invoked, if the syntax of the message received from the agent is not compliant to TL1 standards.
 
Methods inherited from class com.adventnet.agent.tl1.TL1Agent
addMultiProtocolCommand, checkValidAckCode, enableBuiltInCommands, enableSelfMonitorSupport, exceptionToResponseInfo, getAckTime, getAllSession, getAsyncMode, getATag, getDebugLevel, getInstanceOfCommand, getMaxThreads, getMonitorDataReference, getMultiProtocolCommand, getResponsePacketSize, getServerSession, getServerSession, getSessionList, getStandAlone, getTargetId, getTL1MessageFormatterReference, getTL1TcpTableInfo, isActive, isAuthenticationEnabled, isAutoAckEnabled, isAutoInhibitMode, isCraftSession, isCraftSessionAlive, isValidSyntax, processAutonomous, processModule, registerRRCommandsWithCommandRegistry, registerSecondModifierWithCommandRegistry, registerWithCommandRegistry, sendAutonomousMessage, sendMessage, setAckTime, setAsyncMode, setATag, setAutoAckEnabled, setAutoInhibitMode, setChannelSecurityFile, setCommandSecurityFile, setCraftFlag, setDebugLevel, setMaxThreads, setOperationHandlerFileName, setOperationSecurityFile, setPort, setPorts, setResourceHandlerFileName, setResourceSecurityFile, setResponsePacketSize, setSecurityEnabled, setSecurityFlags, setSecurityLogFile, setSecurityLogSize, setSessionTimeOutInSeconds, setStandAlone, setTargetId, setUserRequestHandler, setUserSecurityFile, startAgents, stopAgent, stopAgents, storeAutoInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TL1Adaptor.MyTL1Agent

public TL1Adaptor.MyTL1Agent()
                      throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

callback

public boolean callback(TL1Session session,
                        TL1Message message,
                        java.lang.String ctag)
Description copied from class: com.adventnet.agent.tl1.TL1Agent
This is implemented for sending response messages for the input message got through the session.

Specified by:
callback in interface TL1Client
Overrides:
callback in class com.adventnet.agent.tl1.TL1Agent
Parameters:
session - - TL1Session through which to send message.
message - - Input message for which response is to be sent.
ctag - This tag is the Correlation Tag of the TL1AckMessage/ TL1ResponseMessage,if the msg is an instanceof TL1AckMessage/ TL1ResponseMessage
This tag is the Correlation Tag of the TL1InputMessage(Request sent), if the msg is null (ie if the request has been timed out).
This tag is the Autonomously Generated Correlation Tag (ATAG), if the msg is an instanceof TL1AutonomousMessage.
Returns:
A boolean value which is used to identify the TL1Message with a particular TL1Client.In the callback(..) method of the TL1Client,which is provided by the API-user,return true,only if the particluar TL1Message is intended to be processed by that TL1Client.If not,return false.

callback

public void callback(TL1Session session,
                     java.lang.String message,
                     java.lang.String ctag,
                     byte type)
Description copied from interface: TL1Client
This method will be invoked whenever a message is received from the agent and parsing is disabled. Here the application may specify what has to be done with the output message from the TL1 Agent(ie whether to print the message on to the console or save it to a file in a database...etc.)

Specified by:
callback in interface TL1Client
Overrides:
callback in class com.adventnet.agent.tl1.TL1Agent
Parameters:
session - TL1Session instance.
message - The raw/unparsed data received in the form of a String.
ctag - This tag is the Correlation Tag of the responseString which could be either an acknowledgement/response message. message
This tag is the Autonomously Generated Correlation Tag (ATAG), if the responseString is an autonomous message.
type - 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.


processErrorMessage

public void processErrorMessage(TL1Session session,
                                java.lang.String err)
Description copied from interface: TL1Client
This method will be invoked, if the syntax of the message received from the agent is not compliant to TL1 standards.

Specified by:
processErrorMessage in interface TL1Client
Overrides:
processErrorMessage in class com.adventnet.agent.tl1.TL1Agent
Parameters:
session - TL1Session instance.
err - Error String.