|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.adventnet.tl1.TL1ParserOptions
This class provides the mechanism to set the various parser options for a particular TL1Session. The TL1ParserOptions object can be obtained using the method getTL1ParserOptions(), defined in TL1Session.
The options provided include the ones to determine whether the TL1Messages are to be parsed or not,whether or not to drop Ack messages and Autonomous messages in callback,whether or not to drop the echo of Input messages (sent by some agents)as well as whether or not to parse the Text block portion of the TL1Message.
There are a few situations where we have to turn off the parsing of the TL1 message. One particular situation is where the device sends a banner before getting into the TL1 mode. In this particular situation, we should implement the ConnectionHandler interface and in the postConnect(..) method,the parsing of TL1 message should be disabled for a while,until the entire banner is received in the callback method.
This option is useful only in situations like the afore mentioned one. But there is no need to disable TL1 message parsing to get the response in string form.That can automatically be done in the TL1Client implementation irrespective of whether TL1 message parsing is enabled or disabled.
While sending messages asynchronously,if Autonomous messages or Ack messages are sent by the device,they will be received in the callback if the application has registered the TL1Client implementation with the TL1Session. And send(..) will return with the TL1Response message. This class provides the option to drop or receive such messages in callback according to the preference of the user.
Similar option is available to drop the Input messages that are echoed back by some typical agents. Some TL1 devices will echo back the TL1InputMessage sent by the client. By default the TL1Session drops these echoed TL1InputMessages. But if the application wishes to see the echoed TL1InputMessages from the device,then the corresponding option should be turned on.
The next option is the one to enable/disable parsing of TL1TextBlock. Some TL1 devices send messages that are non-compliant with the standard TL1 syntax.Very often the non-compliance is in the TextBlock portion of the message sent by the device.In such circumstances the option to disable TextBlock parsing should be set,in order to avoid exceptions.
TL1Session.getTL1ParserOptions(),
ConnectionHandler| Constructor Summary | |
(package private) |
TL1ParserOptions()
Default Constructor |
| Method Summary | |
void |
dropTL1AckMsgInCallback(boolean flag)
Method to set the flag which determines whether or not to drop the TL1AckMessages in the callback(..) |
void |
dropTL1AutoMsgInCallback(boolean flag)
Method to set the flag which determines whether or not to drop TL1AutonomousMessages in the callback(..) |
void |
dropTL1InputMsgInCallback(boolean flag)
Method to set the flag which determines whether or not to drop the echo of TL1InputMessages in the callback(..) |
boolean |
isDroppedTL1AckMsgInCallback()
Method to get the status of the flag which indicates whether or not the TL1AckMessages are dropped in callback(..) |
boolean |
isDroppedTL1AutoMsgInCallback()
Method to get the status of the flag which indicates whether or not the TL1AutonomousMessages are dropped in the callback(..) |
boolean |
isDroppedTL1InputMsgInCallback()
Method to get the status of the flag which indicates whether or not the echo of TL1InputMessage is dropped in the callback(..) |
boolean |
isEnabledTL1MessageParsing()
Method to get the status of the flag which determines whether the TL1 Message Parser is enabled or disabled. |
boolean |
isReceiveRawData()
Method to verify receiveRawData is turned on/off. |
boolean |
isSetTL1TextBlockParsing()
Method to verify whether the TL1TextBlock parsing is enabled or disabled |
void |
receiveRawData(boolean flag)
This flag should be set, only if TL1 Message Parsing is disabled. |
void |
setTL1MessageParsing(boolean flag)
Method to set the flag which determines whether or not to enable the TL1 Message Parser. |
void |
setTL1TextBlockParsing(boolean flag)
To set a boolean value to enable or disable parsing of TL1TextBlock. |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
TL1ParserOptions()
| Method Detail |
public void dropTL1InputMsgInCallback(boolean flag)
flag - If flag is set to true, TL1InputMessages will be dropped
in the callback(..).public boolean isDroppedTL1InputMsgInCallback()
public void dropTL1AckMsgInCallback(boolean flag)
flag - If flag is set to true, TL1AckMessages will be dropped
in callback(..)public boolean isDroppedTL1AckMsgInCallback()
public void dropTL1AutoMsgInCallback(boolean flag)
flag - If flag is set to true, TL1AutonomousMessages will be
dropped in callback(..)public boolean isDroppedTL1AutoMsgInCallback()
public void setTL1MessageParsing(boolean flag)
flag - true indicates that parser should be enabled.
public boolean isEnabledTL1MessageParsing()
public void setTL1TextBlockParsing(boolean flag)
flag - true if parsing is to be done else false.public boolean isSetTL1TextBlockParsing()
public void receiveRawData(boolean flag)
flag - true means callback will be invoked with the invalid
message received from the agent.
public boolean isReceiveRawData()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||