com.adventnet.tl1.message
Class TL1ResponseMessage

java.lang.Object
  |
  +--com.adventnet.tl1.message.TL1Message
        |
        +--com.adventnet.tl1.message.TL1ResponseMessage

public class TL1ResponseMessage
extends TL1Message

This class represents the Output Response Message generated and sent from the NE to the TL1 Manager. This is sent in response to the Input Message command sent earlier by the Manager requesting a certain action to be executed at the NE. This Message comprises of a Header, Reponse ID and a Text Block represented by TL1Header, TL1ResponseID and TL1TextBlock respectively.

TL1 Response Message block

See Also:
TL1Header, TL1ResponseID, TL1TextBlock

Field Summary
static java.lang.String COMPLETED
          Constant for Completion code that represents request Completed.
static java.lang.String DELAYED_ACTIVATION
          Constant for Completion code that represents delayed activation of request.
static java.lang.String DENIED
          Constant for Completion code that represents request denied.
static java.lang.String PARTIAL_SUCCESS
          Constant for Completion code that represents request partially completed.
static java.lang.String RETRIEVE
          Constant for Completion code when the request message has RTRV as command verb.
 
Constructor Summary
TL1ResponseMessage()
          Default constructor, initializes message type as type TL1API.RESPONSE_MESSAGE.
 
Method Summary
 byte[] encode()
          Encodes the message.Not to be invoked by the user.This is used internally by our API.
 TL1Header getHeader()
          Gets the TL1Header object.
 TL1ResponseID getResponseId()
          Gets the TL1ResponseID object.
 int getSize()
          Returns the size of the message.
 char getTerminator()
          Gets the terminator character .
 TL1TextBlock getTextBlock()
          Gets the TL1TextBlock object.
 void setHeader(TL1Header header)
          Sets the TL1Header object with the given object.
 void setResponseId(TL1ResponseID responseID)
          Sets the TL1ResponseID object with the given object.
 void setTerminator(char term)
          Sets the terminator character .
 void setTextBlock(TL1TextBlock textBlock)
          Sets the TL1TextBlock object with the given object.
 
Methods inherited from class com.adventnet.tl1.message.TL1Message
getType, isSetSplCharParsing, setSplCharParsing, setType, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COMPLETED

public static java.lang.String COMPLETED
Constant for Completion code that represents request Completed.

DENIED

public static java.lang.String DENIED
Constant for Completion code that represents request denied.

PARTIAL_SUCCESS

public static java.lang.String PARTIAL_SUCCESS
Constant for Completion code that represents request partially completed.

DELAYED_ACTIVATION

public static java.lang.String DELAYED_ACTIVATION
Constant for Completion code that represents delayed activation of request.

RETRIEVE

public static java.lang.String RETRIEVE
Constant for Completion code when the request message has RTRV as command verb.
The NE may start returning available information to the OS even before all the requested information is gathered. In this case, this Completion code is used.
Constructor Detail

TL1ResponseMessage

public TL1ResponseMessage()
Default constructor, initializes message type as type TL1API.RESPONSE_MESSAGE.
Method Detail

getHeader

public TL1Header getHeader()
Gets the TL1Header object. It is composed of Source Identifier, TL1Date, and TL1Time.
Returns:
TL1Header object.
See Also:
TL1Header

setHeader

public void setHeader(TL1Header header)
Sets the TL1Header object with the given object. It is composed of Source Identifier , TL1Date and TL1Time.
Parameters:
header - TL1Header.
See Also:
TL1Header

getResponseId

public TL1ResponseID getResponseId()
Gets the TL1ResponseID object. It describes the response type.
Returns:
TL1ResponseID object.
See Also:
TL1ResponseID

setResponseId

public void setResponseId(TL1ResponseID responseID)
Sets the TL1ResponseID object with the given object. It describes the response type .
Parameters:
responseID - instance of TL1ResponseID.
See Also:
TL1ResponseID

getTextBlock

public TL1TextBlock getTextBlock()
Gets the TL1TextBlock object. This is optional, used to represent information specific to the particular output response.
Returns:
TL1TextBlock object.
See Also:
TL1TextBlock

setTextBlock

public void setTextBlock(TL1TextBlock textBlock)
Sets the TL1TextBlock object with the given object. This is optional, used to represent information specific to the particular output response.
Parameters:
textBlock - instance of TL1TextBlock.
See Also:
TL1TextBlock

setTerminator

public void setTerminator(char term)
Sets the terminator character . It contains either ';' or '>' character . ';' indicates the termination of the response message. '>' indicates more reponse message will follow .
Parameters:
term - character (';' or '>')

getTerminator

public char getTerminator()
Gets the terminator character . It returns either ';' or '>' character . ';' indicates the termination of the response message. '>' indicates more reponse message will follow .
Returns:
character. (';' or '>').

getSize

public int getSize()
Returns the size of the message.
Returns:
size as an integer.

encode

public byte[] encode()
Encodes the message.Not to be invoked by the user.This is used internally by our API.
Overrides:
encode in class TL1Message
Returns:
Returns the message as bytes.