com.adventnet.tl1
Class ConnectionHandlerImpl

java.lang.Object
  |
  +--com.adventnet.tl1.ConnectionHandlerImpl

public class ConnectionHandlerImpl
extends java.lang.Object
implements ConnectionHandler

This is the implementation of the ConnectionHandler interface which helps the user to take some action before and after connecting to the TL1Agent. This interface can also enable the user setup the device in the TL1 mode. For example,some devices expect a particular sequence of ACSII characters (say,"\n\r;") before it can start operating in the TL1 mode. On the other hand, some devices send banners (ASCII text strings) before on establishing connection.This can cause the API to throw parse exceptions since these text strings are not in TL1 format. This methods in this interface can help bypass the banner so that the TL1 communcation can proceed.


Constructor Summary
ConnectionHandlerImpl()
           
 
Method Summary
 void postConnect(TL1Session session)
          This is invoked after the connection is esatablished with the TL1 device/agent.In this example, this method will send a control sequence ("\n\r;") to bring the device into TL1 mode and wait till the banner message is completely received.
 void preConnect(TL1Session session)
          The user can perform necessary actions (if required),before establishing connection with the TL1 Device.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionHandlerImpl

public ConnectionHandlerImpl()
Method Detail

preConnect

public void preConnect(TL1Session session)
The user can perform necessary actions (if required),before establishing connection with the TL1 Device.
Specified by:
preConnect in interface ConnectionHandler
Parameters:
session - TL1Session instance.

postConnect

public void postConnect(TL1Session session)
This is invoked after the connection is esatablished with the TL1 device/agent.In this example, this method will send a control sequence ("\n\r;") to bring the device into TL1 mode and wait till the banner message is completely received.
Specified by:
postConnect in interface ConnectionHandler
Parameters:
session - TL1Session instance.