com.adventnet.agent.tl1
Class TL1Agent

java.lang.Object
  |
  +--com.adventnet.agent.tl1.TL1Agent

public class TL1Agent
extends java.lang.Object
implements TL1Client

TL1 Agent implementation class.


Inner Class Summary
(package private)  class TL1Agent.SessionTimeOutMaintainer
          This class does the two function.
 
Field Summary
(package private)  boolean ackFlag
           
(package private)  AutoAcknowledge acknow
           
(package private)  boolean ackSenderFlag
           
(package private)  long ackTime
           
(package private)  TL1API api
           
(package private)  boolean authFlag
           
(package private)  java.util.Hashtable autoTable
           
(package private)  java.util.Vector autoVec
           
(package private)  TL1BuiltInCommand builtCommands
           
(package private)  java.lang.String builtCommandsName
           
(package private)  boolean builtInFlag
           
(package private)  boolean channelFlag
           
(package private) static TL1Session craftSession
           
(package private)  DelayActivation delay
           
(package private)  TL1MessageFormatter formatter
           
(package private)  boolean inhibitFlag
           
(package private) static boolean isAutoAlreadySent
           
(package private)  boolean isCraftSessionAlive
           
(package private) static boolean isResponseSent
           
(package private)  boolean isSent
           
 SecurityView mainView
           
(package private) static MonitorData monitor
           
(package private)  boolean monitorFlag
           
(package private)  java.util.Vector requestVector
           
(package private)  boolean securityFlag
           
(package private)  SelfMonitor selfMonitor
           
(package private)  TL1ServerSession[] server
           
(package private)  java.util.Hashtable sessionTimeOutTable
           
(package private)  boolean standAloneFlag
           
(package private)  int timeOutSeconds
           
static Log tl1Log
           
 java.lang.String vendorName
           
 
Constructor Summary
TL1Agent()
          Constructor for creating TL1Agent.
 
Method Summary
(package private) static void ()
           
 void addMultiProtocolCommand(java.lang.String command)
          Adds the Multi protocol related commands in the registry.
 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.
 boolean checkValidAckCode(java.lang.String ackCode)
          Returns true is the ack code is valid one.
(package private)  boolean clearAutoMessages(TL1Session session)
          This method is used to clear all the autonomous messages present in the queue for the given session.
(package private)  void displayAutoMessages(TL1Session sess)
          This method will be called from TL1BuiltIncommand(ALW-AUTMSG).
 void enableBuiltInCommands(boolean tl1BulitInStatus)
          Sets the status of TL1BuiltInCommand.
(package private)  void enableCraftInterface()
          This method enable the craft interface support.
 void enableSelfMonitorSupport(boolean selfMonitorStatus)
          Sets the status of SelfMonitor.
 TL1AgentResponseInfo exceptionToResponseInfo(TL1AgentException exception)
          This method is used to pass any TL1AgentExceptions occur while creating responseInfo.
 long getAckTime()
          Returns the Ack time in milliseconds.
 java.util.Vector getAllSession()
          This will return the Vector of sessions present in TL1API.
 boolean getAsyncMode()
          Getter of the current process mode .
 double getATag(TL1Session sess)
          Returns the ATag of the last autonomous sent in this session.
(package private)  java.lang.String[] getBuiltInCommands()
          Returs the array of Built in commands.
(package private)  java.util.Hashtable getCommandRegistry()
          Returns the Command Registry.
 int getDebugLevel()
          Returns the DebugLevel.
 TL1RequestHandler getInstanceOfCommand(java.lang.String commandCode)
          Returns the Instance for the given command.
 int getMaxThreads()
          Getter of the max threads started for Asynchronous processing.
 MonitorData getMonitorDataReference()
          Returns the Monitor Data Object.
 java.util.Vector getMultiProtocolCommand()
          Returns the Vector of multi protocol related commands.
 int getResponsePacketSize()
          Gets the Response packet size.
 TL1ServerSession getServerSession()
          Returns the TL1ServerSession.
 TL1ServerSession getServerSession(int port)
          Returns the TL1ServerSession of specified port.
 java.util.Vector getSessionList()
          Returns the Vector of currently connected sessions with the agent.
 boolean getStandAlone()
          Returns the status of the stand alone flag.
 java.lang.String getTargetId()
          Returns the target id.
 TL1MessageFormatter getTL1MessageFormatterReference()
          Returns the TL1MessageFormatter reference.
 java.util.Hashtable getTL1TcpTableInfo()
          This will return the Hashtable containing the TL1TcpTable info.
 boolean isActive(int port)
          Returns true if the specified port is alive.
 boolean isAuthenticationEnabled()
          Returns true if Authentication is enabled.
 boolean isAutoAckEnabled()
          Returns true if auto acknowledgement is enabled.
 boolean isAutoInhibitMode(TL1Session session)
          Returns true if the given session is in autonomous inhibiting mode.
(package private)  boolean isBuiltIncommand(java.lang.String command)
          Returns true if the command is Builtin command.
static boolean isCraftSession(TL1Session sess)
          Checks if the given session is Craft session.
 boolean isCraftSessionAlive()
          Returns true if the craft session is alive.
 boolean isValidSyntax(TL1InputMessage inputMessage)
          Checks if the input message is valid one as per syntax basis.
 boolean processAutonomous(TL1AgentResponseInfo autoInfo, TL1Session sess)
          This method is used to process and send the autonomous message.
 void processErrorMessage(TL1Session session, java.lang.String errorMesg)
          This method will be invoked, if the syntax of the message received from the agent is not compliant to TL1 standards.
(package private)  boolean processMessage(TL1Session sess, TL1Message message, byte messageType, TL1AgentResponseInfo autoInfo)
          This method is the key one for processing TL1InputMessage.
 boolean processModule(TL1Session session, TL1Message message)
           
 void registerRRCommandsWithCommandRegistry(java.lang.String verb, java.lang.String firstModifier, java.lang.String rrCommand)
          Registers the RR commands with the command registry.
 void registerSecondModifierWithCommandRegistry(java.lang.String verb, java.lang.String firstModifier, java.lang.String secondModifier)
          Registers the second modifier with the command registry.
 void registerWithCommandRegistry(java.lang.String command, TL1RequestHandler instance)
          Registers the Command with the command Registry.
(package private)  boolean sendAckMessage(java.lang.String ackStr, TL1AgentRequestInfo requestInfo)
          Used for sendinf ack message.
 void sendAutonomousMessage(TL1AgentResponseInfo autoInfo)
          Sends the Autonomous to all the sessions.
static boolean sendMessage(TL1Session session, TL1Message mess, TL1AgentRequestInfo request)
          This is used to send the message.
 void setAckTime(long ackTime)
          Sets the ack time.
 void setAsyncMode(boolean mode)
          Allows agent to process the requests asynchronously.
 void setATag(TL1Session sess, double tag)
          Set the new ATag for the given session.
 void setAutoAckEnabled(boolean ackFlag)
          Enable or dissable the auto acknowledgement.
 void setAutoInhibitMode(TL1Session session)
          This method sets the the given session in autonomous inhit mode.
 void setChannelSecurityFile(java.lang.String fileName)
          Sets Channel Security file location.
 void setCommandSecurityFile(java.lang.String fileName)
          Sets Command Security file location.
 void setCraftFlag(boolean craftFlag)
          Sets the status of Craft interface.
(package private) static void setCraftSession(TL1Session sess)
          Set the session of the craft interface.
 void setDebugLevel(int debug)
          Sets the debuglevel.
 boolean setMaxThreads(int a)
          Setter for the number of threads to be started for asynchronous processing .
 void setOperationHandlerFileName(java.lang.String fileName)
          Sets the Operation handler file name .
 void setOperationSecurityFile(java.lang.String fileName)
          Sets Operation Security file location.
 void setPort(int port)
          Sets the port and that will in turn starts the Agent.
 void setPorts(int[] ports)
          Sets the array of ports where tl1 agent has to start.
 void setResourceHandlerFileName(java.lang.String fileName)
          Sets the Resource handler file name.
 void setResourceSecurityFile(java.lang.String fileName)
          Sets Resource Security file location.
 void setResponsePacketSize(int packetSize)
          Sets the Response packet size .
 void setSecurityEnabled(boolean authFlag)
          Sets the authentication file name which is used when the authentication for TL1 is enabled.
 void setSecurityFlags(boolean user, boolean chann, boolean command, boolean oper, boolean resource)
          Sets the status of different security views.
 void setSecurityLogFile(java.lang.String fileName)
          Sets the Security log file .
 void setSecurityLogSize(int size)
          Sets the SecurityLog size.
(package private)  void setSessionsWithATag(java.util.Vector sessions)
          This method is called only once.i.e while sending autonomous at the first time.
 void setSessionTimeOutInSeconds(int seconds)
          Sets the session time out seconds.
(package private)  void setSessionTimeTable(TL1Session sess)
          Sets the session as a key in the sessionTimeOutTable and value is the the no of seconds remaining to reach the "keep time alive" period.
 void setStandAlone(boolean standAloneFlag)
          Sets the status of the stand alone flag.
 void setTargetId(java.lang.String target)
          Sets the target id.
 void setUserRequestHandler(UserRequestHandler requestHandler)
          Sets the UserRequestHandler
 void setUserSecurityFile(java.lang.String fileName)
          Sets the User security persistence file.
 void startAgents(int[] ports)
          Starts the agent at multiple ports specified in the array.
 void stopAgent(int port)
          Stops the agent running in the specified port.
 void stopAgents()
          Stops the agent.
 void storeAutoInfo(TL1AgentResponseInfo info, TL1Session sess)
          This method receives the Autonomous info (TL1AgentResponseInfo) and put it in the autoTable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

server

TL1ServerSession[] server

authFlag

boolean authFlag

securityFlag

boolean securityFlag

api

TL1API api

vendorName

public java.lang.String vendorName

builtCommands

TL1BuiltInCommand builtCommands

builtCommandsName

java.lang.String builtCommandsName

monitor

static MonitorData monitor

selfMonitor

SelfMonitor selfMonitor

isAutoAlreadySent

static boolean isAutoAlreadySent

ackSenderFlag

boolean ackSenderFlag

isSent

boolean isSent

isResponseSent

static boolean isResponseSent

ackTime

long ackTime

requestVector

java.util.Vector requestVector

acknow

volatile AutoAcknowledge acknow

ackFlag

boolean ackFlag

craftSession

static TL1Session craftSession

isCraftSessionAlive

boolean isCraftSessionAlive

delay

DelayActivation delay

formatter

TL1MessageFormatter formatter

autoVec

java.util.Vector autoVec

autoTable

java.util.Hashtable autoTable

inhibitFlag

boolean inhibitFlag

builtInFlag

boolean builtInFlag

monitorFlag

boolean monitorFlag

timeOutSeconds

int timeOutSeconds

sessionTimeOutTable

java.util.Hashtable sessionTimeOutTable

channelFlag

boolean channelFlag

standAloneFlag

boolean standAloneFlag

mainView

public SecurityView mainView

tl1Log

public static Log tl1Log
Constructor Detail

TL1Agent

public TL1Agent()
Constructor for creating TL1Agent.
Method Detail

static void ()

setDebugLevel

public void setDebugLevel(int debug)
Sets the debuglevel.
Parameters:
debug - - The debug level.

getDebugLevel

public int getDebugLevel()
Returns the DebugLevel.

getBuiltInCommands

java.lang.String[] getBuiltInCommands()
Returs the array of Built in commands.

isBuiltIncommand

boolean isBuiltIncommand(java.lang.String command)
Returns true if the command is Builtin command. Else returns false.

enableBuiltInCommands

public void enableBuiltInCommands(boolean tl1BulitInStatus)
Sets the status of TL1BuiltInCommand. If it's true then the commands related to that are registered in a common registry.
Parameters:
tl1BulitInStatus - - The status of the TL1BuiltInCommand.

enableSelfMonitorSupport

public void enableSelfMonitorSupport(boolean selfMonitorStatus)
Sets the status of SelfMonitor. If it's true then the commands related to that are registered in a common registry.
Parameters:
selfMonitorStatus - - The status of Self Monitor

registerWithCommandRegistry

public void registerWithCommandRegistry(java.lang.String command,
                                        TL1RequestHandler instance)
Registers the Command with the command Registry.
Parameters:
command - - The command to be registered.
instance - - The object to be invoked when the command is executed.

registerRRCommandsWithCommandRegistry

public void registerRRCommandsWithCommandRegistry(java.lang.String verb,
                                                  java.lang.String firstModifier,
                                                  java.lang.String rrCommand)
Registers the RR commands with the command registry.
Parameters:
verb - - The command Verb.
firstModifier - - The first modifierof the command. If rr commnads comes under first modifier level then it will be null.
rrCommand - - The rr Command.

registerSecondModifierWithCommandRegistry

public void registerSecondModifierWithCommandRegistry(java.lang.String verb,
                                                      java.lang.String firstModifier,
                                                      java.lang.String secondModifier)
Registers the second modifier with the command registry.
Parameters:
verb - - The command Verb.
firstModifier - - The first modifierof the command.
secondModifier - - The second modifier of the command.

setUserRequestHandler

public void setUserRequestHandler(UserRequestHandler requestHandler)
Sets the UserRequestHandler

callback

public 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.
Specified by:
callback in interface TL1Client
Parameters:
session - - TL1Session through which to send message.
message - - Input message for which response is to be sent.

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
Tags copied from interface: TL1Client
Parameters:
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
This tag is the Autonomously Generated Correlation Tag (ATAG), if the responseString is an autonomous 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.


processErrorMessage

public void processErrorMessage(TL1Session session,
                                java.lang.String errorMesg)
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
Tags copied from interface: TL1Client
Parameters:
session - TL1Session instance.
errorMsg - Error String.

setAsyncMode

public void setAsyncMode(boolean mode)
Allows agent to process the requests asynchronously. To change the mode of process.
Parameters:
mode - process mode (true for asynchronous).
See Also:
getAsyncMode()

getAsyncMode

public boolean getAsyncMode()
Getter of the current process mode .
Returns:
true for asynchronous, false for synchronous.
See Also:
setAsyncMode(boolean mode)

setMaxThreads

public boolean setMaxThreads(int a)
Setter for the number of threads to be started for asynchronous processing .
Parameters:
a - The number of threads(0 to 20 ).
Returns:
boolean true if number of threads with in the limit.
See Also:
getMaxThreads()

getAllSession

public java.util.Vector getAllSession()
This will return the Vector of sessions present in TL1API.

getMaxThreads

public int getMaxThreads()
Getter of the max threads started for Asynchronous processing.
Returns:
the total no of threads started.
See Also:
setMaxThreads(int a)

setResponsePacketSize

public void setResponsePacketSize(int packetSize)
Sets the Response packet size . By default it is 4096 bytes.
Parameters:
packetSize - - The response packet size.

getResponsePacketSize

public int getResponsePacketSize()
Gets the Response packet size.

addMultiProtocolCommand

public void addMultiProtocolCommand(java.lang.String command)
Adds the Multi protocol related commands in the registry.

getMultiProtocolCommand

public java.util.Vector getMultiProtocolCommand()
Returns the Vector of multi protocol related commands.

processModule

public boolean processModule(TL1Session session,
                             TL1Message message)

processMessage

boolean processMessage(TL1Session sess,
                       TL1Message message,
                       byte messageType,
                       TL1AgentResponseInfo autoInfo)
This method is the key one for processing TL1InputMessage. The follwing steps are followed in this.If any where violation is found then TL1AgentException will be thrown and that will be used for showing error response. 1.Valid syntax check. 2.Check for correlation tag presence. 3.If security is enabled then selected security checking. 4.Delay Activation verification and processing. 5.Searching the command in command registry and execution.

processAutonomous

public boolean processAutonomous(TL1AgentResponseInfo autoInfo,
                                 TL1Session sess)
This method is used to process and send the autonomous message.
Parameters:
autoInfo - - TL1AgentResponseInfo which has the autonomous details.
sess - - TL1Session , where the autonomous is to be sent.

isValidSyntax

public boolean isValidSyntax(TL1InputMessage inputMessage)
Checks if the input message is valid one as per syntax basis. The input message should atleast have three colons and end with a semicolon. e.g act-user:::;
Parameters:
inputMessage - - TL1InputMessage to be checked for it's validity in syntax basis.

sendAutonomousMessage

public void sendAutonomousMessage(TL1AgentResponseInfo autoInfo)
Sends the Autonomous to all the sessions.
Parameters:
autoInfo - - The TL1AgentResponseInfo having autonomous details.

getInstanceOfCommand

public TL1RequestHandler getInstanceOfCommand(java.lang.String commandCode)
Returns the Instance for the given command.
Parameters:
commandCode - -The comand code whoes Instance has to be retieved.

getCommandRegistry

java.util.Hashtable getCommandRegistry()
Returns the Command Registry.

setStandAlone

public void setStandAlone(boolean standAloneFlag)
Sets the status of the stand alone flag.
Parameters:
standAloneFlag - - The status of the stand alone.

getStandAlone

public boolean getStandAlone()
Returns the status of the stand alone flag.

setCraftFlag

public void setCraftFlag(boolean craftFlag)
Sets the status of Craft interface.
Parameters:
craftFlag - - craft status.

enableCraftInterface

void enableCraftInterface()
This method enable the craft interface support.

setCraftSession

static void setCraftSession(TL1Session sess)
Set the session of the craft interface.
Parameters:
sess - - The craft session.

isCraftSession

public static boolean isCraftSession(TL1Session sess)
Checks if the given session is Craft session.
Parameters:
sess - - The session to be checked whether it is the craft session or not.

isCraftSessionAlive

public boolean isCraftSessionAlive()
Returns true if the craft session is alive.

getMonitorDataReference

public MonitorData getMonitorDataReference()
Returns the Monitor Data Object.

getTargetId

public java.lang.String getTargetId()
Returns the target id.

setTargetId

public void setTargetId(java.lang.String target)
Sets the target id.
Parameters:
target - - The target id.

isAuthenticationEnabled

public boolean isAuthenticationEnabled()
Returns true if Authentication is enabled.

setSessionTimeTable

void setSessionTimeTable(TL1Session sess)
Sets the session as a key in the sessionTimeOutTable and value is the the no of seconds remaining to reach the "keep time alive" period.

sendAckMessage

boolean sendAckMessage(java.lang.String ackStr,
                       TL1AgentRequestInfo requestInfo)
Used for sendinf ack message.
Parameters:
ackStr - - The acknowledegement string. It should be valid one.
requestInfo - - The TL1AgentRequestInfo of the command which needs acknowledgement.

checkValidAckCode

public boolean checkValidAckCode(java.lang.String ackCode)
Returns true is the ack code is valid one.
Parameters:
ackCode - - The ackCode to be checked for it's validity.

setAutoInhibitMode

public void setAutoInhibitMode(TL1Session session)
This method sets the the given session in autonomous inhit mode. If it is set no autonomous message reaches the session instead it will be stored. It can be viewed by executing the request ALW-INHMSG.
Parameters:
session - - TL1Session whose autonomous are to be blocked.

isAutoInhibitMode

public boolean isAutoInhibitMode(TL1Session session)
Returns true if the given session is in autonomous inhibiting mode.
Parameters:
session - - TL1Session whose inhibit status is to viewed.

storeAutoInfo

public void storeAutoInfo(TL1AgentResponseInfo info,
                          TL1Session sess)
This method receives the Autonomous info (TL1AgentResponseInfo) and put it in the autoTable. Whenever ALW-AUTMSG is executed the auto info present in the table are displayed.Security related autonomous will not be sent to every one. So the session passed here only get the corresponding autonomous.So this will be used by security objects to store the autonomous whenever it's in inhibit mode.

displayAutoMessages

void displayAutoMessages(TL1Session sess)
This method will be called from TL1BuiltIncommand(ALW-AUTMSG). This will display all the autonomous message remain pending due to INH-AUTMSG for the givenn session.

clearAutoMessages

boolean clearAutoMessages(TL1Session session)
This method is used to clear all the autonomous messages present in the queue for the given session.

setPort

public void setPort(int port)
             throws java.lang.Exception
Sets the port and that will in turn starts the Agent. The client can connect to the specfied port and can querry the agent.
Parameters:
port - - The port where tl1 agent has to start.

setPorts

public void setPorts(int[] ports)
              throws java.lang.Exception
Sets the array of ports where tl1 agent has to start. The client can connect any of the specfied port and can querry the agent.
Parameters:
ports - - The array of ports where tl1 agent should Start.

startAgents

public void startAgents(int[] ports)
                 throws java.lang.Exception
Starts the agent at multiple ports specified in the array.
Parameters:
ports - - port numbers where the agent is to be started.

stopAgents

public void stopAgents()
Stops the agent. This will stop the agent running in a single port or multiple ports.

stopAgent

public void stopAgent(int port)
Stops the agent running in the specified port.
Parameters:
port - - The port where the agent is running.

getTL1TcpTableInfo

public java.util.Hashtable getTL1TcpTableInfo()
This will return the Hashtable containing the TL1TcpTable info. The keys are "IP" (the value is a string of Ip address where agent is running), "PORT" (the value is Vector containg the port numbers where agent is running), "STATE" (the state of the ports if 1 it is in on state).

getServerSession

public TL1ServerSession getServerSession(int port)
Returns the TL1ServerSession of specified port.
Parameters:
port - - The port whose TL1ServerSession is to be retrieved.

getServerSession

public TL1ServerSession getServerSession()
Returns the TL1ServerSession.

isActive

public boolean isActive(int port)
Returns true if the specified port is alive.
Parameters:
port - - The port which is to be verified if it is alive or not.

setSessionsWithATag

void setSessionsWithATag(java.util.Vector sessions)
This method is called only once.i.e while sending autonomous at the first time. This method keeps session as key and the ATag as value.

getATag

public double getATag(TL1Session sess)
Returns the ATag of the last autonomous sent in this session. If the corressponding session is not present in the table then '0' will be returned.
Parameters:
sess - - TL1Session ,whose ATag has to be retrieved.

setATag

public void setATag(TL1Session sess,
                    double tag)
Set the new ATag for the given session.
Parameters:
sess - - TL1Session whose ATag has to be set.
tag - - The ATag to be set.

getSessionList

public java.util.Vector getSessionList()
Returns the Vector of currently connected sessions with the agent.

setSessionTimeOutInSeconds

public void setSessionTimeOutInSeconds(int seconds)
Sets the session time out seconds.
Parameters:
seconds - - The session time out seconds.

setUserSecurityFile

public void setUserSecurityFile(java.lang.String fileName)
Sets the User security persistence file.
Parameters:
fileName - - User Security persistence file.

setSecurityFlags

public void setSecurityFlags(boolean user,
                             boolean chann,
                             boolean command,
                             boolean oper,
                             boolean resource)
Sets the status of different security views.
Parameters:
user - - User security flag.
chann - - Channel security flag.
command - - Command security flag.
oper - - Operation security flag.
resource - - Resource security flag.

setCommandSecurityFile

public void setCommandSecurityFile(java.lang.String fileName)
Sets Command Security file location.
Parameters:
fileName - - Command security persistence file.

setOperationSecurityFile

public void setOperationSecurityFile(java.lang.String fileName)
Sets Operation Security file location.
Parameters:
fileName - - The operation security persistence file name.

setResourceSecurityFile

public void setResourceSecurityFile(java.lang.String fileName)
Sets Resource Security file location.
Parameters:
fileName - - The Resource security persistence file name.

setChannelSecurityFile

public void setChannelSecurityFile(java.lang.String fileName)
Sets Channel Security file location.
Parameters:
fileName - - The Channel security persistence file name.

setSecurityLogFile

public void setSecurityLogFile(java.lang.String fileName)
Sets the Security log file .
Parameters:
fileName - - The security log persistence file name.

setSecurityLogSize

public void setSecurityLogSize(int size)
Sets the SecurityLog size. (The maximum number of events the log file will store).
Parameters:
size - - The security log szie.

setOperationHandlerFileName

public void setOperationHandlerFileName(java.lang.String fileName)
Sets the Operation handler file name .
Parameters:
fileName - - The operation handler (The file instrumented by the user incase of operation security is enabled)

setResourceHandlerFileName

public void setResourceHandlerFileName(java.lang.String fileName)
Sets the Resource handler file name.
Parameters:
fileName - - The resource handler (The file instrumented by the user incase of operation security is enabled)

setSecurityEnabled

public void setSecurityEnabled(boolean authFlag)
Sets the authentication file name which is used when the authentication for TL1 is enabled.
Parameters:
authFlag - - The status of the TL1 Security.
See Also:
setAuthenticationEnabled(boolean)

getTL1MessageFormatterReference

public TL1MessageFormatter getTL1MessageFormatterReference()
Returns the TL1MessageFormatter reference.

setAckTime

public void setAckTime(long ackTime)
Sets the ack time. It means that if the acknowledgement will be sent to the NE only if the delay happening for the response of a request crosses this limit. By default it is 2000 milliseconds.
Parameters:
ackTime - - Ack time in milli seconds.

getAckTime

public long getAckTime()
Returns the Ack time in milliseconds.

setAutoAckEnabled

public void setAutoAckEnabled(boolean ackFlag)
Enable or dissable the auto acknowledgement. By default the ackFlag is true.
Parameters:
ackFlag - - The status of the auto acknowledgement.

isAutoAckEnabled

public boolean isAutoAckEnabled()
Returns true if auto acknowledgement is enabled. Otherwise false.

exceptionToResponseInfo

public TL1AgentResponseInfo exceptionToResponseInfo(TL1AgentException exception)
This method is used to pass any TL1AgentExceptions occur while creating responseInfo. Here this exception is processed and converted into responseInfo
Parameters:
exception - - The TL1AgentException comprising TL1Error info.

sendMessage

public static boolean sendMessage(TL1Session session,
                                  TL1Message mess,
                                  TL1AgentRequestInfo request)
This is used to send the message. It may be ResponseMessage,AutonomousMessage and AcknowledgementMessage.
Parameters:
session - - TL1Session through which the message has to be sent.
mess - - message may be Response,Acknowledge and Autonomous.
request - - TL1AgentRequestInfo .This has a flag ackFlag and that is made true here so as to facillitate the acknowledgement sending incase the execution of the command exceeds certain time(2 secs).This is applicable only for ResponseMessages for other messages it will be null.