WebNMS TL1 API Release 4 Specification

com.adventnet.tl1.message
Class TL1InputMessage

java.lang.Object
  |
  +--com.adventnet.tl1.message.TL1Message
        |
        +--com.adventnet.tl1.message.TL1InputMessage
All Implemented Interfaces:
java.io.Serializable

public class TL1InputMessage
extends TL1Message

This class is used for constructing input commands that can be sent from the TL1 Manager to the TL1 Network Element(device) in order to retrieve some information or to configure the device.

TL1 Input Message block

For example, the input message

RTRV-OC12:FMX117SP:OC12-ALL:12:::STINFO=YES,SSBITINFO=YES;
is created as follows,
 TL1InputMessage ipmsg = new TL1InputMessage();
 ipmsg.setCommandCode("RTRV-OC12");
 ipmsg.setTargetId("FMX117SP");
 ipmsg.setAccessId(new TL1AccessIdentifier("OC12-ALl"));
 ipmsg.setCorrelationTag("12");
 ipmsg.setMessagePayloadBlock(new TL1MessagePayloadBlock("::STINFO=YES,SSBITINFO=YES"));
 

See Also:
TL1AccessIdentifier, TL1MessagePayloadBlock, TL1GeneralBlock, Serialized Form

Fields inherited from class com.adventnet.tl1.message.TL1Message
ACK_MESSAGE, AUTONOMOUS_MESSAGE, INPUT_MESSAGE, INVALID_TL1_MESSAGE, RESPONSE_MESSAGE
 
Constructor Summary
TL1InputMessage()
          Default constructor that creates an instance of TL1InputMessage object.
TL1InputMessage(java.lang.String cmdCode)
          Constructor that creates an instance of TL1InputMessage object and intializes with the specified CommandCode.
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of this object.
 TL1ParamBlock getAccessId()
          Gets the TL1AccessIdentifier of the message as a TL1ParamBlock object.
 java.lang.String getAppendEnd()
          Gets the string appended to the end of each Input Message.
 java.lang.String getAppendFront()
          Gets the string appended to the front of each Input Message.
 java.lang.String getCommandCode()
          Gets the command code set on this Input Message.
 java.lang.String getCorrelationTag()
          Gets the Correlation Tag set on this Input Message.
 TL1ParamBlock getGeneralBlock()
          Gets the TL1GeneralBlock of the Input message as a TL1ParamBlock.
 TL1ParamGroup getMessagePayloadBlock()
          Gets the Message Payload Block object of the Input Message as a TL1ParamGroup.
 java.lang.String getMessageTag()
          Gets the Correlation Tag set on this Input Message.
 int getRetries()
          Gets the number of retries before timeout.
 java.lang.String[] getRetryCodes()
          This method is used to get the Retry codes of TL1InputMessage.
 java.lang.String getTargetId()
          Gets the Target Identifier of the message as a String.
 int getTimeout()
          Gets the timeout value.
 void setAccessId(TL1ParamBlock aID)
          Sets the specified Access Identifier on this message as a TL1ParamBlock.
 void setAppendEnd(java.lang.String s)
          Sets the string to be appended to the end of each Input Message.
 void setAppendFront(java.lang.String s)
          Sets the string to be appended to the front of each Input Message.
 void setCommandCode(java.lang.String tL1CmdCode)
          Sets the TL1InputMessage object with the given command code string.
 void setCorrelationTag(java.lang.String correlationTag)
          Sets the specified Correlation Tag on this Input Message.
 void setGeneralBlock(TL1ParamBlock genBlk)
          Sets the specified TL1GeneralBlock on this Input Message.
 void setMessagePayloadBlock(TL1ParamGroup mpb)
          Sets the MessagePayloadBlock in the Input Message as a TL1ParamGroup object.
 void setRetries(int count)
          Sets the number of retries before timeout.
 void setRetryCodes(java.lang.String[] retryCodes)
          This method is used to give the Retry codes.
 void setTargetId(java.lang.String tID)
          Sets the specified Target Identifier on this Input Message.
 void setTimeout(int timeout)
          Sets the timeout value.
 java.lang.String toString()
          Returns the string representation of this object.
 
Methods inherited from class com.adventnet.tl1.message.TL1Message
encode, equals, getMessageClassifier, getMessageString, getSize, getType, setMessageClassifier, setMessageString, setType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TL1InputMessage

public TL1InputMessage()
Default constructor that creates an instance of TL1InputMessage object.

TL1InputMessage

public TL1InputMessage(java.lang.String cmdCode)
Constructor that creates an instance of TL1InputMessage object and intializes with the specified CommandCode.

Parameters:
cmdCode - String representing Command Code.
Method Detail

getRetries

public int getRetries()
Gets the number of retries before timeout. The retries in the Input Message overrides the retries value in session. This means, only when the retries in the Input Message is 0, the session value is used.

The default value of retries is 0.

Returns:
The retries value.

setRetries

public void setRetries(int count)
Sets the number of retries before timeout. The retries in the Input Message overrides the retries value in session. This means, only when the retries in the Input Message is 0, the session value is used.

The default value of retries is 0.

Parameters:
count - The retries value.

setRetryCodes

public void setRetryCodes(java.lang.String[] retryCodes)
This method is used to give the Retry codes. If the retry codes of this given input message is matches with the CompletionCode(DENY, PRTL, ..) or AckCode(RL, NG..) of it's corresponding response then the input message will be sent again depends on it retries count.

Parameters:
retryCodes - String array contains the retrycodes.

getRetryCodes

public java.lang.String[] getRetryCodes()
This method is used to get the Retry codes of TL1InputMessage.

Returns:
String array contains Retry codes. Null if it not set.

getTimeout

public int getTimeout()
Gets the timeout value. The timeout is the time to wait for the first response in milliseconds, before attempting a retransmission. The timeout in the Input Message overrides the timeout value in session. This means, only when the timeout in the Input Message is 0, the session timeout value is used.

The default value of timeout is 0 milliseconds.

Returns:
The timeout value in milliseconds used for monitoring the request

setTimeout

public void setTimeout(int timeout)
Sets the timeout value.

The timeout in the Input Message overrides the timeout value in session. This means, only when the timeout in the Input Message is 0, the session timeout value is used.

The default value of timeout is 0 milliseconds.

The timeout value to be set should be in milliseconds.

Parameters:
timeout - The timeout value to be used for monitoring the request.

setAppendFront

public void setAppendFront(java.lang.String s)
Sets the string to be appended to the front of each Input Message.

Parameters:
s - String to be appended.

setAppendEnd

public void setAppendEnd(java.lang.String s)
Sets the string to be appended to the end of each Input Message.

Parameters:
s - String to be appended.

getAppendFront

public java.lang.String getAppendFront()
Gets the string appended to the front of each Input Message.

Returns:
String appended to the front.

getAppendEnd

public java.lang.String getAppendEnd()
Gets the string appended to the end of each Input Message.

Returns:
String appended to the end.

setCommandCode

public void setCommandCode(java.lang.String tL1CmdCode)
Sets the TL1InputMessage object with the given command code string.

Parameters:
tL1CmdCode - String representing CommandCode.

Since:
TL1 API 3

getCommandCode

public java.lang.String getCommandCode()
Gets the command code set on this Input Message.

It consists of three parts namely Verb, Modifier1 and Modifier2. The verb part is mandatory while the modifiers are optional. The verb represents the action to be taken at the NE and the modifiers identify the the object of the Verb where the action is to be applied in the NE.

Returns:
String representing command code.

Since:
TL1 API 3

setTargetId

public void setTargetId(java.lang.String tID)
Sets the specified Target Identifier on this Input Message.

Parameters:
tID - String representing Target Id.

getTargetId

public java.lang.String getTargetId()
Gets the Target Identifier of the message as a String.

The target identifier contains a single parameter that identifies the end target NE to which the input message is directed. The presence of TID in all input message is a requirement, but its value may be null. That is, the target identifier is represented by two successive colons.

Returns:
String representing Target Identifier.

getAccessId

public TL1ParamBlock getAccessId()
Gets the TL1AccessIdentifier of the message as a TL1ParamBlock object. The Access Identification (AID) block normally contains one (or more) simple or compound parameter(s) that uniquely identifies the entity within the target NE to be acted upon by the input message to the NE.

Returns:
Instance of TL1ParamBlock.

Since:
TL1 API 3
See Also:
TL1AccessIdentifier

setAccessId

public void setAccessId(TL1ParamBlock aID)
Sets the specified Access Identifier on this message as a TL1ParamBlock.

Parameters:
aID - Instance of TL1ParamBlock.

Since:
TL1 API 3
See Also:
TL1AccessIdentifier

setCorrelationTag

public void setCorrelationTag(java.lang.String correlationTag)
Sets the specified Correlation Tag on this Input Message. This tag correlates the input message with its associated output response(s).

Parameters:
correlationTag - String representing ctag.

getMessageTag

public java.lang.String getMessageTag()
Gets the Correlation Tag set on this Input Message. This tag correlates the input message with the output message.

Overrides:
getMessageTag in class TL1Message
Returns:
String representing the correlation tag.

Since:
TL1 API 3

getCorrelationTag

public java.lang.String getCorrelationTag()
Gets the Correlation Tag set on this Input Message. This tag correlates the input message with its associated output response(s).

Returns:
String representing the correlation tag.

setGeneralBlock

public void setGeneralBlock(TL1ParamBlock genBlk)
Sets the specified TL1GeneralBlock on this Input Message. It includes the supporting parameters which affect the way in which the input message is to be executed in the NE.

Parameters:
genBlk - instance of TL1ParamBlock.

Since:
TL1 API 3
See Also:
TL1GeneralBlock

getGeneralBlock

public TL1ParamBlock getGeneralBlock()
Gets the TL1GeneralBlock of the Input message as a TL1ParamBlock. It includes the supporting parameters which affect the way in which the input message is to be executed in the NE.

Returns:
Instance of TL1ParamBlock.

Since:
TL1 API 3
See Also:
TL1GeneralBlock

getMessagePayloadBlock

public TL1ParamGroup getMessagePayloadBlock()
Gets the Message Payload Block object of the Input Message as a TL1ParamGroup. Each element contains vector of TL1ParamBlocks.

Returns:
Instance of TL1ParamGroup.

Since:
TL1 API 3
See Also:
TL1MessagePayloadBlock

setMessagePayloadBlock

public void setMessagePayloadBlock(TL1ParamGroup mpb)
Sets the MessagePayloadBlock in the Input Message as a TL1ParamGroup object.

Parameters:
mpb - Instance of TL1ParamGroup.

Since:
TL1 API 3
See Also:
TL1MessagePayloadBlock

toString

public java.lang.String toString()
Returns the string representation of this object.

Overrides:
toString in class TL1Message
Returns:
String representation of this object.

clone

public java.lang.Object clone()
Creates and returns a copy of this object.

Overrides:
clone in class TL1Message
Returns:
a clone of this instance.

Since:
TL1 API 3

WebNMS TL1 API Release 4 Specification