com.adventnet.adaptors.tl1
Class TL1Adaptor

java.lang.Object
  extended by com.adventnet.adaptors.AbstractAdaptor
      extended by com.adventnet.adaptors.tl1.TL1Adaptor
All Implemented Interfaces:
Adaptor, java.io.Serializable, javax.management.DynamicMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster

public class TL1Adaptor
extends AbstractAdaptor
implements javax.management.DynamicMBean

This class acts as a JMX adaptor for TL1 protocol.

It itself acts as a mbean for exposing the TL1 properties. This class extends the SimpleAdaptor which provides the implementation of ServiceInfo interface and acts as the TL1 NE (Agent)

The port number of the service can be specified in the ObjectName with key-value pair as, port=9099(by default). When the port is not specifies in the ObjectName, the TL1 Agent gets started at port 9099.

For example, to start the TL1 agent at 9199, you can specify the following object name:

  • DefaultDomain:type=com.adventnet.adaptors.tl1.TL1Adaptor,protocol=tl1,port=9199

    See Also:
    Serialized Form

    Nested Class Summary
    (package private)  class TL1Adaptor.MyTL1Agent
               
     
    Nested classes/interfaces inherited from class com.adventnet.adaptors.AbstractAdaptor
    AbstractAdaptor.ProcessNotification
     
    Field Summary
    (package private)  boolean ackSenderFlag
               
    (package private)  long ackTime
               
    (package private)  boolean asyncMode
               
    (package private)  boolean authFlag
               
    (package private) static boolean builtInFlag
               
    (package private)  boolean craftFlag
               
     boolean isAllSession
               
    (package private) static int MAX_THREADS
               
    (package private) static boolean monitorFlag
               
    (package private)  TL1MultiProtocolHandler mpHandler
               
    (package private)  boolean multiplePortFlag
               
    (package private)  int port
              the port in which the service gets started
    (package private)  int[] ports
               
    (package private)  int respPacketSize
               
    (package private) static boolean standAloneFlag
               
    (package private)  int THREAD_LIMIT
               
     
    Fields inherited from class com.adventnet.adaptors.AbstractAdaptor
    notifications, processnotification, state
     
    Constructor Summary
    TL1Adaptor()
              The NoArg constructor used to initialize the TL1Adaptor in forming the MBeanInfo and getting the reference of the MBeanServer using the MBeanServerFactory.findJMXAgent(...) method.
    TL1Adaptor(int port)
              This constrctor takes tl1Port( where TL1 Agent) should start as input.
    TL1Adaptor(int port, javax.management.MBeanServer server)
              This consructor is used to receive the port number where TL1Server has to be started and the mbean server instance.
     
    Method Summary
    protected  void bind()
              Must be used to bind to a naming service or to bind to a ServerSocket
    protected  void countClients()
               
    protected  void destroyAdaptor()
              Kills the adaptor and releases all its resources
     void enableAuthentication(boolean flag)
              Enables authentication.
     void enableAuthorisation(boolean flag)
              Enables authorisation.
     void enableBuiltInCommands(boolean builtInFlag)
              Enables the Builtin command support if builtInFlag is true.
     void enableCraftInterface(boolean craftFlag)
              Enables the craft interface support if it's true.
     void enableSelfMonitorSupport(boolean monitorFlag)
              Enables the self monitoring support if monitorFlag is true.
     long getAckTime()
              Used to get the time in long which represents milliseconds after which an acknowledgement has to be sent if the response hasn't been sent.
     javax.management.ObjectName getAdaptorObjectName()
              Returns the adaptor object name
     java.util.Vector getAllSession()
              This will return the Vector of sessions present in TL1API.
     boolean getAsyncMode()
              Getter of the current process mode .
     java.lang.Object getAttribute(java.lang.String attribute)
              Gets the value of a specific attribute of this MBean.
     javax.management.AttributeList getAttributes(java.lang.String[] attributes)
              Enables the values of several attributes of this MBean.
     boolean getCraftStatus()
              Returns true if Craft is enabled.
     int getDebugLevel()
              Getter for the debug level.
     int getMaxThreads()
              Getter of the max threads started for Asynchronous processing.
     javax.management.MBeanInfo getMBeanInfo()
              This method discovers the attributes and operations this MBean exposes for management.
     javax.management.ObjectName getObjectName()
              Returns the ObjectName of this adaptor with which it has been registered with the MBeanServer.
     int[] getPorts()
              Returns the port numbers in which the service gets started.
     java.lang.String getProtocol()
              Gets the protocol supported by this adaptor.
     int getResponsePacketSize()
              This is used to get the size of the response packet, above which the response will be split and sent.
     java.lang.String getTargetId()
              Used to get the TargetID string.
     com.adventnet.agent.tl1.TL1Agent getTL1Agent()
              Returns TL1Agent reference.
     TL1ServerSession getTL1ServerSession()
              Returns the TL1ServerSession incase the agent is running in the single port.
     TL1ServerSession getTL1ServerSession(int port)
              Returns the TL1ServerSession for the specified port.
     java.util.Hashtable getTL1TcpTableInfo()
              This will return the Hashtable containing the TL1TcpTable info.
     java.lang.String getVendorName()
              Returns vendorName who distributes this TL1 agent
    protected  void instantiateAdaptor()
              This method sets the adaptor reference in TL1Agent.
     java.lang.Object invoke(java.lang.String actionName, java.lang.Object[] params, java.lang.String[] signature)
              Invokes an action on the original MBean associated with this MBean.
     boolean isAuthenticationEnabled()
              Returns whether TL1 authentication is enabled or not.
     boolean isAutoAckEnabled()
              Used to get whether the automatic acknowledgement is enabled or not.
     boolean isMultiplePortMode()
              Used to get whether the agent is running in multiple port mode.
     void isSetAllSession(boolean flag)
               
     javax.management.ObjectName preRegister(javax.management.MBeanServer server, javax.management.ObjectName name)
              This method is an implementation of MBeanRegistration interface.
     void processErrorMessage(TL1Session session, java.lang.String errorMessage)
              This method will be called when any TL1 request reaches the session of the tl1 agent.
     boolean processTL1Request(TL1Session session, TL1Message message)
              This method will be called when any request reaches the session of the TL1 agent.
    protected  void receive()
               
     void sendAckMessage(TL1Session sess, java.lang.String ack, java.lang.String cTag)
              This method can be called by the user to send an acknowledgement.
     void setAckTime(long ackTime)
              Used to set the time in long which represents milliseconds after which an acknowledgement has to be sent if the response hasn't been sent.
     void setAsyncMode(boolean mode)
              Allows agent to process the requests asynchronously.
     void setAttribute(javax.management.Attribute attribute)
              Sets the value of a specific attribute of this MBean.
     javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
              Sets the values of several attributes of this MBean.
     void setAutoAckEnabled(boolean autoAckFlag)
              Used to set whether the agent should send an acknowledgement of type IN_PROGRESS if the response is not recieved within 2 seconds.
     void setChannelSecurityFile(java.lang.String fileName)
              Sets Channel Security file location.
     void setCommandSecurityFile(java.lang.String fileName)
              Sets Command Security file location.
     void setDebugLevel(int debugLevel)
              This method is used to set the debug level.
     boolean setMaxThreads(int a)
              Setter for the number of threads to be started for asynchronous processing .
     void setMultiplePortMode(boolean multiplePortFlag)
              Used to set the agent in multiple port mode.
     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 tl1Port)
              Deprecated. Since AdventNet AgentToolkit Release 4.2. Use setPorts(int[]) method instead.
     void setPorts(int[] ports)
              Sets the port numbers on which the service should get restarted.
     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 size)
              This is used to set the size of the response packet, above which the response will be split and sent.
     void setSecurityEnabled(boolean authFlag)
              Enabled/Disables TL1 authentication
     void setSecurityFlags(boolean user, boolean chan, boolean command, boolean oper, boolean resource)
              Sets the status of different security views.
     void setSecurityLogFile(java.lang.String file)
              Sets the Security log file .
     void setSecurityLogSize(int size)
              Sets the SecurityLog size.
     void setSessionTimeOutInSeconds(int timeOutSeconds)
              Sets the session "keep time alive" in seconds.
     void setStandAlone(boolean flag)
              This method is used to set the standAloneFlag which is used internally for processing the TL1Message depending upon whether it is a stand-alone agent or used in common instrumentation.
     void setTargetId(java.lang.String target)
              Used to set the TargetID of the agent.
     void setTL1MessageFormatterReference(com.adventnet.agent.tl1.TL1MessageFormatter formatter)
              Sets the TL1MessageFormatter reference.
    (package private)  void setTL1TcpTableInfo(java.util.Hashtable table)
              Sets the TL1TcpTableInfo.
     void setUserRequestHandler(com.adventnet.agent.tl1.UserRequestHandler requestHandler)
              Sets the UserRequestHandler
     void setUserSecurityFile(java.lang.String fileName)
              Sets the User security persistence file.
     void setVendorName(java.lang.String vendorName)
              Sets the vendorName who distributes this TL1 agent
    (package private)  void stopAgent(int port)
              This method is used for config mib handling.
    protected  void unbind()
              Must be used to unbind from a naming service or to relese a ServerSocket
     
    Methods inherited from class com.adventnet.adaptors.AbstractAdaptor
    addNotificationListener, changeState, getAdaptorVersion, getHost, getNotificationInfo, getPort, getState, getStateInString, handleNotification, isActive, isSecure, postDeregister, postRegister, preDeregister, processNotification, removeNotificationListener, startService, stopService
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    mpHandler

    TL1MultiProtocolHandler mpHandler

    isAllSession

    public boolean isAllSession

    standAloneFlag

    static boolean standAloneFlag

    respPacketSize

    int respPacketSize

    builtInFlag

    static boolean builtInFlag

    monitorFlag

    static boolean monitorFlag

    port

    int port
    the port in which the service gets started


    ports

    int[] ports

    multiplePortFlag

    boolean multiplePortFlag

    ackSenderFlag

    boolean ackSenderFlag

    ackTime

    long ackTime

    MAX_THREADS

    static int MAX_THREADS

    asyncMode

    boolean asyncMode

    THREAD_LIMIT

    final int THREAD_LIMIT
    See Also:
    Constant Field Values

    craftFlag

    boolean craftFlag

    authFlag

    boolean authFlag
    Constructor Detail

    TL1Adaptor

    public TL1Adaptor()
    The NoArg constructor used to initialize the TL1Adaptor in forming the MBeanInfo and getting the reference of the MBeanServer using the MBeanServerFactory.findJMXAgent(...) method.

    See Also:
    preRegister(MBeanServer, ObjectName);

    TL1Adaptor

    public TL1Adaptor(int port)
    This constrctor takes tl1Port( where TL1 Agent) should start as input.

    Parameters:
    tl1Port -

    TL1Adaptor

    public TL1Adaptor(int port,
                      javax.management.MBeanServer server)
    This consructor is used to receive the port number where TL1Server has to be started and the mbean server instance.

    Method Detail

    getResponsePacketSize

    public int getResponsePacketSize()
    This is used to get the size of the response packet, above which the response will be split and sent. The default value is 4096 bytes.

    Returns:
    The response packet size limit.

    setResponsePacketSize

    public void setResponsePacketSize(int size)
    This is used to set the size of the response packet, above which the response will be split and sent. The default value is 4096 bytes.

    Parameters:
    size - The size(in bytes) of the response packet as an integer.

    getTL1Agent

    public com.adventnet.agent.tl1.TL1Agent getTL1Agent()
    Returns TL1Agent reference.


    isSetAllSession

    public void isSetAllSession(boolean flag)

    getMBeanInfo

    public javax.management.MBeanInfo getMBeanInfo()
    This method discovers the attributes and operations this MBean exposes for management.

    Specified by:
    getMBeanInfo in interface javax.management.DynamicMBean
    Returns:
    An instance of MBeanInfo allowing to retrieve all attributes and operations of this MBean.

    getAttribute

    public java.lang.Object getAttribute(java.lang.String attribute)
                                  throws javax.management.AttributeNotFoundException,
                                         javax.management.MBeanException,
                                         javax.management.ReflectionException
    Gets the value of a specific attribute of this MBean.

    Specified by:
    getAttribute in interface javax.management.DynamicMBean
    Parameters:
    attribute - A String specifying the name' of the attribute to be retrieved.
    Returns:
    The value of the retrieved attribute.
    Throws:
    javax.management.AttributeNotFoundException
    javax.management.MBeanException
    javax.management.ReflectionException

    getAttributes

    public javax.management.AttributeList getAttributes(java.lang.String[] attributes)
    Enables the values of several attributes of this MBean.

    Specified by:
    getAttributes in interface javax.management.DynamicMBean
    Parameters:
    attributes - A list of attributes to be retrieved.
    Returns:
    The value of the retrieved attributes as attributeList.

    invoke

    public java.lang.Object invoke(java.lang.String actionName,
                                   java.lang.Object[] params,
                                   java.lang.String[] signature)
                            throws javax.management.MBeanException,
                                   javax.management.ReflectionException
    Invokes an action on the original MBean associated with this MBean.

    Specified by:
    invoke in interface javax.management.DynamicMBean
    Parameters:
    actionName - The name of the action to be invoked.
    params - An array containing the parameters to be set when the action is invoked
    signature - An array containing the signature of the action. The class objects will be loaded using the same class loader as the one used for loading the MBean on which the action was invoked.
    Returns:
    The object returned by the action, which represents the result ofinvoking the action on the specified MBean.
    Throws:
    javax.management.MBeanException
    javax.management.ReflectionException

    setAttribute

    public void setAttribute(javax.management.Attribute attribute)
                      throws javax.management.AttributeNotFoundException,
                             javax.management.InvalidAttributeValueException,
                             javax.management.MBeanException,
                             javax.management.ReflectionException
    Sets the value of a specific attribute of this MBean.

    Specified by:
    setAttribute in interface javax.management.DynamicMBean
    Parameters:
    attribute - The identification of the attribute to be set and the value it is to be set to.
    Throws:
    javax.management.AttributeNotFoundException
    javax.management.InvalidAttributeValueException
    javax.management.MBeanException
    javax.management.ReflectionException

    setAttributes

    public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
    Sets the values of several attributes of this MBean.

    Specified by:
    setAttributes in interface javax.management.DynamicMBean
    Parameters:
    attributes - A list of attributes: The identification of the attributes to be set and the values they are to be set to.
    Returns:
    The list of attributes that were set, with their new values.

    getTL1ServerSession

    public TL1ServerSession getTL1ServerSession()
    Returns the TL1ServerSession incase the agent is running in the single port.


    getTL1ServerSession

    public TL1ServerSession getTL1ServerSession(int port)
    Returns the TL1ServerSession for the specified port.

    Parameters:
    port - - The port whose TL1ServerSession is to be retrieved.

    preRegister

    public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
                                                   javax.management.ObjectName name)
                                            throws java.lang.Exception
    This method is an implementation of MBeanRegistration interface. Allows this MBean to perform any operations it needs before being registered in the MBeanServer. If the name of the MBean is not specified, the MBean can provide a name for its registration. If any exception is raised, the MBean will not be registered with the MBeanServer.

    This method is called by the MBeanServer before this mbean getting registered with the server. If the passed objectName is invalid, the returned objectName is taken as valid name to get registered with the server.

    The TL1 agent gets actually started only inside this method at the specified port mentioned in the key "port". If the key "port" is absent, then the service gets started at the default port 9099.

    Specified by:
    preRegister in interface javax.management.MBeanRegistration
    Overrides:
    preRegister in class AbstractAdaptor
    Parameters:
    server - The MBeanServer in which the MBean will be registered.
    name - The object name of the MBean.
    Returns:
    The name of the MBean registered.
    Throws:
    java.lang.Exception - This exception should be caught by the MBeanServer and re-thrown as an MBeanRegistrationException.

    setTL1TcpTableInfo

    void setTL1TcpTableInfo(java.util.Hashtable table)
    Sets the TL1TcpTableInfo.


    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).


    processErrorMessage

    public void processErrorMessage(TL1Session session,
                                    java.lang.String errorMessage)
    This method will be called when any TL1 request reaches the session of the tl1 agent. This method gives a hook for the API users for handling the message before it get processed by this adaptor. API users can override this method for message processing. The TL1 message gets processed by the agent after this method call.

    Parameters:
    sess - - TL1Session through which to send message.
    message - - Input message for which response is to be sent.

    processTL1Request

    public boolean processTL1Request(TL1Session session,
                                     TL1Message message)
    This method will be called when any request reaches the session of the TL1 agent. This method gives a hook for the API users for handling the request before it get processed by this adaptor. API users can override this method for request processing or filtering. The request gets processed by the agent after this method call.

    Parameters:
    session - the session on which agent is communicating.
    message - the TL1Message.
    Returns:
    the boolean, which says whether the agent should continue processing. By default returns true.

    getAllSession

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


    enableBuiltInCommands

    public void enableBuiltInCommands(boolean builtInFlag)
    Enables the Builtin command support if builtInFlag is true.


    enableSelfMonitorSupport

    public void enableSelfMonitorSupport(boolean monitorFlag)
    Enables the self monitoring support if monitorFlag is true.


    enableCraftInterface

    public void enableCraftInterface(boolean craftFlag)
    Enables the craft interface support if it's true.

    Parameters:
    craftFlag - - craft status.

    getCraftStatus

    public boolean getCraftStatus()
    Returns true if Craft is enabled.


    setSessionTimeOutInSeconds

    public void setSessionTimeOutInSeconds(int timeOutSeconds)
    Sets the session "keep time alive" in seconds.

    Parameters:
    seconds - - The session time out seconds.

    instantiateAdaptor

    protected void instantiateAdaptor()
    This method sets the adaptor reference in TL1Agent. Then calls the startAgents method in TL1Agent.

    Specified by:
    instantiateAdaptor in class AbstractAdaptor

    bind

    protected void bind()
    Description copied from class: AbstractAdaptor
    Must be used to bind to a naming service or to bind to a ServerSocket

    Specified by:
    bind in class AbstractAdaptor

    receive

    protected void receive()

    countClients

    protected void countClients()

    unbind

    protected void unbind()
    Description copied from class: AbstractAdaptor
    Must be used to unbind from a naming service or to relese a ServerSocket

    Specified by:
    unbind in class AbstractAdaptor

    destroyAdaptor

    protected void destroyAdaptor()
    Description copied from class: AbstractAdaptor
    Kills the adaptor and releases all its resources

    Specified by:
    destroyAdaptor in class AbstractAdaptor

    stopAgent

    void stopAgent(int port)
    This method is used for config mib handling. Used to stop the agent when the tcp entry is removed.


    getAdaptorObjectName

    public javax.management.ObjectName getAdaptorObjectName()
    Description copied from class: AbstractAdaptor
    Returns the adaptor object name

    Specified by:
    getAdaptorObjectName in interface Adaptor
    Specified by:
    getAdaptorObjectName in class AbstractAdaptor

    getPorts

    public int[] getPorts()
    Returns the port numbers in which the service gets started.

    Returns:
    the port numbers as an int[].

    setPorts

    public void setPorts(int[] ports)
    Sets the port numbers on which the service should get restarted. This will stop all the services and then restart the agent. This should be called after the Registration of adaptor with the MBeanServer.

    Parameters:
    ports - the new port numbers.
    See Also:
    setMultiplePortMode

    setPort

    public void setPort(int tl1Port)
    Deprecated. Since AdventNet AgentToolkit Release 4.2. Use setPorts(int[]) method instead.

    Sets the port number on which the service should get restarted

    Specified by:
    setPort in interface Adaptor
    Overrides:
    setPort in class AbstractAdaptor
    Parameters:
    port - the new port number.

    setMultiplePortMode

    public void setMultiplePortMode(boolean multiplePortFlag)
    Used to set the agent in multiple port mode.

    See Also:
    isMultiplePortMode(), setPorts(int[])

    isMultiplePortMode

    public boolean isMultiplePortMode()
    Used to get whether the agent is running in multiple port mode.

    See Also:
    setMultiplePortMode()

    setAutoAckEnabled

    public void setAutoAckEnabled(boolean autoAckFlag)
    Used to set whether the agent should send an acknowledgement of type IN_PROGRESS if the response is not recieved within 2 seconds. This should be called before Registration of adaptor with the MBeanServer.

    Parameters:
    autoAckFlag - false if it needs to be disabled. true by default.
    See Also:
    isAutoAckEnabled(), setPorts(boolean)

    isAutoAckEnabled

    public boolean isAutoAckEnabled()
    Used to get whether the automatic acknowledgement is enabled or not.

    Returns:
    true if enabled, false if disabled.
    See Also:
    setAutoAckEnabled()

    setAckTime

    public void setAckTime(long ackTime)
    Used to set the time in long which represents milliseconds after which an acknowledgement has to be sent if the response hasn't been sent. This should be called before Registration of adaptor with the MBeanServer.

    Parameters:
    ackTime - - time in milliseconds as a long value.
    See Also:
    getAckTime()

    getAckTime

    public long getAckTime()
    Used to get the time in long which represents milliseconds after which an acknowledgement has to be sent if the response hasn't been sent.

    Returns:
    time in milliseconds as a long value.
    See Also:
    setAckTime()

    setTargetId

    public void setTargetId(java.lang.String target)
    Used to set the TargetID of the agent. This should be called after Registration of adaptor with the MBeanServer.

    Parameters:
    target - - The target Id string. If not the machine name would be taken.
    See Also:
    getTargetId()

    getTargetId

    public java.lang.String getTargetId()
    Used to get the TargetID string.

    Returns:
    The TargetId as a String.
    See Also:
    setTargetId()

    setUserRequestHandler

    public void setUserRequestHandler(com.adventnet.agent.tl1.UserRequestHandler requestHandler)
    Sets the UserRequestHandler


    getObjectName

    public javax.management.ObjectName getObjectName()
    Returns the ObjectName of this adaptor with which it has been registered with the MBeanServer.

    Returns:
    the ObjectName

    getProtocol

    public java.lang.String getProtocol()
    Gets the protocol supported by this adaptor.

    Specified by:
    getProtocol in interface Adaptor
    Specified by:
    getProtocol in class AbstractAdaptor

    getVendorName

    public java.lang.String getVendorName()
    Returns vendorName who distributes this TL1 agent


    setVendorName

    public void setVendorName(java.lang.String vendorName)
    Sets the vendorName who distributes this TL1 agent

    Parameters:
    vendorName - - The vendor name.

    setSecurityEnabled

    public void setSecurityEnabled(boolean authFlag)
    Enabled/Disables TL1 authentication

    Parameters:
    authFlag - - The status of TL1 Security.

    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 chan,
                                 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.

    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.

    setSecurityLogFile

    public void setSecurityLogFile(java.lang.String file)
    Sets the Security log file .

    Parameters:
    fileName - - The security log persistence file name.

    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 resource security is enabled)

    enableAuthorisation

    public void enableAuthorisation(boolean flag)
                             throws java.lang.UnsupportedOperationException
    Enables authorisation.

    Specified by:
    enableAuthorisation in interface Adaptor
    Specified by:
    enableAuthorisation in class AbstractAdaptor
    Throws:
    java.lang.UnsupportedOperationException - when authorisation is not suppported

    enableAuthentication

    public void enableAuthentication(boolean flag)
                              throws java.lang.UnsupportedOperationException
    Enables authentication.

    Specified by:
    enableAuthentication in interface Adaptor
    Specified by:
    enableAuthentication in class AbstractAdaptor
    Throws:
    java.lang.UnsupportedOperationException - when authentication is not supported

    isAuthenticationEnabled

    public boolean isAuthenticationEnabled()
    Returns whether TL1 authentication is enabled or not.


    setStandAlone

    public void setStandAlone(boolean flag)
    This method is used to set the standAloneFlag which is used internally for processing the TL1Message depending upon whether it is a stand-alone agent or used in common instrumentation. This method will be called from the main file in common instrumentation and should not be used by the user otherwise.

    Parameters:
    flag - - The status of stand alone flag.

    setDebugLevel

    public void setDebugLevel(int debugLevel)
    This method is used to set the debug level.

    Parameters:
    debugLevel - Any one of the static variables defined in com.adventnet.utils.tl1.TL1Utils.

    getDebugLevel

    public int getDebugLevel()
    Getter for the debug level.

    Returns:
    1 - FATAL 2 - ERROR 3 - WARN 4 - INFO 5 - DEBUG 6 - TRACE

    sendAckMessage

    public void sendAckMessage(TL1Session sess,
                               java.lang.String ack,
                               java.lang.String cTag)
    This method can be called by the user to send an acknowledgement. In TL1 Standalone, by default, the getAck() method will be called and the user can return a valid Ack code there. However if he wishes to send an acknowledgement from the doAction(), then this method can be used.

    Parameters:
    sess - The TL1Session to which the acknowledgement must be sent.
    ack - The ack message. One of the static variables in TL1AckMessage.
    cTag - The Correlation Tag of the acknowledgement.

    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()

    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)

    setTL1MessageFormatterReference

    public void setTL1MessageFormatterReference(com.adventnet.agent.tl1.TL1MessageFormatter formatter)
    Sets the TL1MessageFormatter reference.

    Parameters:
    formatter - - The TL1MessageFormatter reference.