Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## cnrg.itx.signal
Class SigPacket

    java.lang.Object
      |
      +--cnrg.itx.signal.SigPacket

Direct Known Subclasses:
  InvitePacket

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

This is the base class representing the Signaling Packet that is sent to and from all Signaling components. All signal packets inherit from this class and add specific information.

See Also:
  Serialized Form

Field Summary
`protected int` | `currentMethod` The method this packet represents
`protected int` | `currentPacket` The type this packet represents
`protected java.lang.Object` | `custom` Any custom object being sent by an application
`protected cnrg.itx.ds.UserID` | `myDestination` UserID of the destination

Constructor Summary
`SigPacket()` Default Constructor constructs an invalid SigPacket
`SigPacket(int m, int p)` Overloaded Constructor constructs a SigPacket that is to be used for a specific method and packet type.
`SigPacket(int m, int p, java.lang.Object o)` Overloaded Constructor constructs a SigPacket that is to be used for a specific method, packet type and Custom Object

Method Summary
`java.lang.Object` | `getCustomObject()` Returns the custom object contained in the SigPacket
`cnrg.itx.ds.UserID` | `getDestination()` Returns the UserID of the destination Signaling component
`int` | `getMethodID()` Returns the method ID associated with this packet
`int` | `getPacketID()` Returns the type of the Sigpacket
`boolean` | `hasCustomObject()` This method informs the callee whether a custom object is contained within this packet or not.
`boolean` | `isAliveQuery()` This method informs the callee whether the packet is for the AliveQuery method.
`boolean` | `isConfirmPacket()` This method informs the callee whether it is a Confirm Packet
`boolean` | `isDial()` This method informs the callee whether the packet is for the Dial method.
`boolean` | `isHangup()` This method informs the callee whether the packet is for the Hangup method.
`boolean` | `isInvitePacket()` This method informs the callee whether it is an Invite Packet
`boolean` | `isResultPacket()` This method informs the callee whether it is a Result Packet
`boolean` | `isSendDTMF()` This method informs the callee whether the packet is for the SendDTMF method.
`void` | `setCustomObject(java.lang.Object o)` Sets the custom object.
`void` | `setDestination(cnrg.itx.ds.UserID uid)` Sets the UserID of the Destination.
`void` | `setMethodType(int mt)` Sets the method type.
`void` | `setPacketType(int pt)` Sets the packet type.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### currentMethod

    protected int currentMethod

  The method this packet represents

### currentPacket

    protected int currentPacket

  The type this packet represents

### myDestination

    protected cnrg.itx.ds.UserID myDestination

  UserID of the destination

### custom

    protected java.lang.Object custom

  Any custom object being sent by an application

Constructor Detail

### SigPacket

    public SigPacket()

  Default Constructor constructs an invalid SigPacket
  Parameters:
    `None.` -

### SigPacket

    public SigPacket(int m,
                     int p)

  Overloaded Constructor constructs a SigPacket that is to be used for a specific method and packet type.
  Parameters:
    `m` - is an integer code for methods handled by Signaling.
    `p` - is an integer code for packet type

### SigPacket

    public SigPacket(int m,
                     int p,
                     java.lang.Object o)

  Overloaded Constructor constructs a SigPacket that is to be used for a specific method, packet type and Custom Object
  Parameters:
    `m` - is an integer code for methods handled by Signaling.
    `p` - is an integer code for packet type
    `o` - is any custom object an application may want to send to a peer.

Method Detail

### getMethodID

    public int getMethodID()

  Returns the method ID associated with this packet
  Parameters:
    `None.` -
  Returns:
    integer value representing the method ID

### getPacketID

    public int getPacketID()

  Returns the type of the Sigpacket
  Parameters:
    `None.` -
  Returns:
    integer value representing the packet type

### setPacketType

    public void setPacketType(int pt)

  Sets the packet type.
  Parameters:
    `pt` - is the integer value of the packet type
  Returns:
    void

### setMethodType

    public void setMethodType(int mt)

  Sets the method type.
  Parameters:
    `mt` - is the integer value of the method type
  Returns:
    void

### setCustomObject

    public void setCustomObject(java.lang.Object o)

  Sets the custom object.
  Parameters:
    `o` - is any object that is being sent in the SigPacket
  Returns:
    void

### getCustomObject

    public java.lang.Object getCustomObject()

  Returns the custom object contained in the SigPacket
  Parameters:
    `None.` -
  Returns:
    integer value representing the packet type

### setDestination

    public void setDestination(cnrg.itx.ds.UserID uid)

  Sets the UserID of the Destination.
  Parameters:
    `uid` - is the UserID object representing the Destination
  Returns:
    void

### getDestination

    public cnrg.itx.ds.UserID getDestination()

  Returns the UserID of the destination Signaling component
  Parameters:
    `None.` -
  Returns:
    integer value representing the packet type

### isDial

    public boolean isDial()

  This method informs the callee whether the packet is for the Dial method.
  Parameters:
    `None` -
  Returns:
    TRUE if it is the Dial method, FALSE otherwise

### isHangup

    public boolean isHangup()

  This method informs the callee whether the packet is for the Hangup method.
  Parameters:
    `None` -
  Returns:
    TRUE if it is the Hangup method, FALSE otherwise

### isSendDTMF

    public boolean isSendDTMF()

  This method informs the callee whether the packet is for the SendDTMF method.
  Parameters:
    `None` -
  Returns:
    TRUE if it is the SendDTMF method, FALSE otherwise

### isAliveQuery

    public boolean isAliveQuery()

  This method informs the callee whether the packet is for the AliveQuery method.
  Parameters:
    `None` -
  Returns:
    TRUE if it is the AliveQuery method, FALSE otherwise

### isInvitePacket

    public boolean isInvitePacket()

  This method informs the callee whether it is an Invite Packet
  Parameters:
    `None` -
  Returns:
    TRUE if it is an Invite Packet, FALSE otherwise

### isResultPacket

    public boolean isResultPacket()

  This method informs the callee whether it is a Result Packet
  Parameters:
    `None` -
  Returns:
    TRUE if it is a Result Packet, FALSE otherwise

### isConfirmPacket

    public boolean isConfirmPacket()

  This method informs the callee whether it is a Confirm Packet
  Parameters:
    `None` -
  Returns:
    TRUE if it is an Confirm Packet, FALSE otherwise

### hasCustomObject

    public boolean hasCustomObject()

  This method informs the callee whether a custom object is contained within this packet or not.
  Parameters:
    `None` -
  Returns:
    TRUE if a custom object is embedded in the packet, FALSE otherwise

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD