HOME

com.ireasoning.protocol.tl1
Class TL1OutputMsg

java.lang.Object
  extended bycom.ireasoning.protocol.tl1.TL1OutputMsg
All Implemented Interfaces:
Msg, Serializable
Direct Known Subclasses:
TL1AckMsg, TL1NotificationMsg, TL1ResponseMsg

public abstract class TL1OutputMsg
extends Object
implements Msg

This class is the base class of all the TL1 output messages.

See Also:
Serialized Form

Field Summary
static SimpleDateFormat DATE_FORMAT
           
 
Fields inherited from interface com.ireasoning.protocol.Msg
ERROR_TYPE
 
Method Summary
 String getCTAG()
          Returns correlation tag
 TL1Date getDate()
          Returns the date information ( such as 00-05-10 ) contained in message header.
 String getHeader()
          Returns raw message header.
 TL1Line[] getPayloadData()
          Returns message payload data as a TL1Line array, each line in the payload is represented as an element in that array.
 String getRawMsg()
          Returns the received raw message.
 String getSID()
          Gets source ID
 String getTerminationCode()
          Get the message's termination code.
 TL1Time getTime()
          Get the time information ( such as 09:23:04 )contained in message header.
 Date getTimestamp()
          Get the date and time information contained in message header.
 int getType()
          Get the message type, one of {TL1OutputMsgType.NOTIFICATION, TL1OutputMsgType.RESPONSE, TL1OutputMsgType.ACK}
 void setDate(TL1Date date)
          Sets a new date
 void setSID(String sid)
          Sets a new source ID
 void setTerminationCode(String term)
          Sets termination code
 void setTime(TL1Time time)
          Sets a new time
 void setTimestamp(Date d)
          Sets a new timestamp
 String toString()
          Returns the raw string message
 void updateTimestamp()
          Sets the header timestamp to be the current time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DATE_FORMAT

public static final SimpleDateFormat DATE_FORMAT
Method Detail

getPayloadData

public TL1Line[] getPayloadData()
Returns message payload data as a TL1Line array, each line in the payload is represented as an element in that array.

Note: TL1 payload :
 
NODE 2000-05-09 17:32:36 M 1 COMPLD "SLOT-3:E1000,EQUIP,,ACT:CARDNAME=E1000" <--- Payload "SLOT-4:OC3,EQUIP,,NA:CARDNAME=OC3-IR:IS"
Payload has the following structure:
Payload contains one or multiple lines. Each Line (Represented by TL1Line) has the following format: "section [: section]*" (section is represented by TL1Section) In each section: "field [, field]*" (field is represented by TL1Field) In each field "name [ = value]"

Returns:
message payload data as a TL1Line array

getHeader

public String getHeader()
Returns raw message header. For example, for the following message, the header part is
"NodeA 2000-05-09 17:32:36
M 123 COMPLD"
      NodeA 2000-05-09 17:32:36
   M  123 COMPLD
      "SLOT-1:E1000,EQUIP,,ACT:CARDNAME=E1000-2:IS"
 


getDate

public TL1Date getDate()
Returns the date information ( such as 00-05-10 ) contained in message header.


setDate

public void setDate(TL1Date date)
Sets a new date

Parameters:
date - new date

getTime

public TL1Time getTime()
Get the time information ( such as 09:23:04 )contained in message header.


setTime

public void setTime(TL1Time time)
Sets a new time

Parameters:
time - new time

getTimestamp

public Date getTimestamp()
Get the date and time information contained in message header.


setTimestamp

public void setTimestamp(Date d)
Sets a new timestamp

Parameters:
d - new timestamp

updateTimestamp

public void updateTimestamp()
Sets the header timestamp to be the current time


getType

public int getType()
Get the message type, one of {TL1OutputMsgType.NOTIFICATION, TL1OutputMsgType.RESPONSE, TL1OutputMsgType.ACK}

Specified by:
getType in interface Msg

getRawMsg

public String getRawMsg()
Returns the received raw message. However, it does not have the echo message.
For example:
    NODE 00-11-20 13:37:26
 M  0 COMPLD
 "TID=NODE_1,PORT=1029"
 


getSID

public String getSID()
Gets source ID


setSID

public void setSID(String sid)
Sets a new source ID

Parameters:
sid - source id.

getCTAG

public String getCTAG()
Returns correlation tag


getTerminationCode

public String getTerminationCode()
Get the message's termination code.

See Also:
TL1TerminationCode.MORE_TO_COME, TL1TerminationCode.END

setTerminationCode

public void setTerminationCode(String term)
Sets termination code

Parameters:
term - termination code

toString

public String toString()
Returns the raw string message

Returns:
the raw string message

HOME

Copyright © 2002 iReasoning Inc. All Rights Reserved.