|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface MessageFormatter
This inferface allows interworking between a TL1 Manager and a TL1 Network Element which may use different TL1 message formats.
The AdventNet TL1 Message Parser expects the TL1 Messages to be in the TL1 standard compliant format. In some cases, the TL1 Network Element (device) may follow a format that is slightly different from the TL1 standard format and may send and receive TL1 messages in this format. This will give rise to situations where the AdventNet TL1 Message Parser is unable to parse certain TL1 Messages from the peer and throws exceptions. This interface will help avoid such situations and enables interworking between the two message formats by allowing the user to convert or modify messages from one format to another.
This interface allows users to format or process TL1 messages that are :
formatMessageReceived, which is invoked before the string
message received from the peer is processed by the TL1 Message Parser, and
formatMessageToSend, which is invoked after the string message
to be sent is processed by the TL1 Message Parser.
For instance, there are lot of TL1 devices which send messages that contain non-standard messages, such as messages with TextBlocks containing characters which are not allowed by the standards and also TextBlocks which contain lines without the delimiters specified by the standards,such as "\r","\n" etc. In such circumstances,this interface provides a useful means to make the message compatible with the standard compliant parser, by defining an appropriate formatting action inside the method contained in this interface implementation.
Registering this handler should have to be done after opening the session The implementation of this interface should be registered with TL1Session as follows.
session.setMessageFormatter(MessageFormatterImpl)
where session is the instance of TL1Session and
MessageFormatterImpl is the implementation of this interface.
TL1Session.setMessageFormatter(com.adventnet.tl1.MessageFormatter),
TL1Session.removeMessageFormatter(),
TL1Session| Method Summary | |
|---|---|
java.lang.String |
formatMessageReceived(java.lang.String message)
This callback method is invoked before parsing the received message. |
java.lang.String |
formatMessageToSend(java.lang.String message)
This callback method is invoked before the TL1 Message is sent to the peer. |
| Method Detail |
|---|
java.lang.String formatMessageReceived(java.lang.String message)
message - String form of the response received.
java.lang.String formatMessageToSend(java.lang.String message)
message - String form of the TL1 message.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||