WebNMS TL1 API Release 4 Specification

com.adventnet.tl1.message
Class TL1Header

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

public class TL1Header
extends java.lang.Object
implements java.io.Serializable

This class represents a TL1 Header block containing information common to both Reponse and Autonomous Messages. It consists of Source Identifier, Date and Time. The Source Identifier identifies the NE from which the response is sent. The Date and Time (represented by TL1Date and TL1Time respectively) represents the day and time at which the Output Message is constructed.

TL1 Header block

For example, the TL1Header

 pascal 2002-06-12 22:05:12
is created as follows,
       TL1Header hdr = new TL1Header();
       hdr.setSourceId("pascal");
       hdr.setDate(new TL1Date(TL1Param.POSITION_DEFINED, 2002, 6, 12));
       hdr.setTime(new TL1Time(TL1Message.RESPONSE_MESSAGE, TL1Param.POSITION_DEFINED, 22, 5, 12));
 

See Also:
TL1Date, TL1Time, Serialized Form

Constructor Summary
TL1Header()
          Default Constructor that creates an instance of the TL1Header object.
TL1Header(java.lang.String sourceId, TL1Param tl1date, TL1Param tl1time)
          Constructor that creates an instance of TL1Header object and initializes the source identifier, date and time fields with the given values.
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of this object.
 TL1Param getDate()
          Gets the TL1Date as a TL1Param from this object.
 java.lang.String getSourceId()
          Gets the source identifier from this object.
 TL1Param getTime()
          Gets the TL1Time as a TL1Param from this object.
 void setDate(TL1Param date)
          Sets the TL1Date as a TL1Param.
 void setSourceId(java.lang.String sourceIdentifier)
          Sets the source identifier with the given value.
 void setTime(TL1Param time)
          Sets the TL1Time as a TL1Param.
 java.lang.String toString()
          Returns this object as a string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TL1Header

public TL1Header()
Default Constructor that creates an instance of the TL1Header object.

TL1Header

public TL1Header(java.lang.String sourceId,
                 TL1Param tl1date,
                 TL1Param tl1time)
Constructor that creates an instance of TL1Header object and initializes the source identifier, date and time fields with the given values.

Parameters:
sourceId - String representing source identifier.
tl1date - TL1Param representing TL1Date.
tl1time - TL1Param representing TL1Time.
Method Detail

getSourceId

public java.lang.String getSourceId()
Gets the source identifier from this object.

Returns:
String representing the source identifier.

setSourceId

public void setSourceId(java.lang.String sourceIdentifier)
Sets the source identifier with the given value.

Parameters:
sourceIdentifier - String representing the source identifier.

getDate

public TL1Param getDate()
Gets the TL1Date as a TL1Param from this object.

Returns:
Instance of TL1Param.

See Also:
TL1Date

setDate

public void setDate(TL1Param date)
Sets the TL1Date as a TL1Param.

Parameters:
date - Instance of TL1Param.

See Also:
TL1Date

getTime

public TL1Param getTime()
Gets the TL1Time as a TL1Param from this object.

Returns:
Instance of TL1Param.

See Also:
TL1Time

setTime

public void setTime(TL1Param time)
Sets the TL1Time as a TL1Param.

Parameters:
time - Instance of TL1Param.

See Also:
TL1Time

toString

public java.lang.String toString()
Returns this object as a string.

Overrides:
toString in class java.lang.Object
Returns:
String representation of this object.

clone

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

Returns:
a clone of this instance.

WebNMS TL1 API Release 4 Specification