cnrg.itx.signal
Class InvitePacket

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

public class InvitePacket
extends SigPacket
implements java.io.Serializable

This class extends SigPacket and is used in the 3-way handshake during a Dial Sequence.

See Also:
Serialized Form

Constructor Summary
InvitePacket()
          Default Constructor for the InvitePacket
InvitePacket(UserID s, Location sl, java.lang.String ad, int meth)
          Overloaded Constructor for the InvitePacket.
 
Method Summary
 void accept()
          Applications call this method to indicate that they accept the invitation.
 void busy()
          Applications call this method to indicate that they are busy at present and cannot accept the invitation.
 void confirm()
          Applications call this method to confirm a sequence.
 java.lang.String getDescription()
          Returns the description of the sender of the InvitePacket
 PropertiesCollection getPropertiesCollection()
          Returns the senders' PropertiesCollection
 java.lang.String getReason()
          Returns the reason an invitation was rejected
 UserID getSenderID()
          Returns the UserID associated with the sender of the InvitePacket
 Location getSenderLoc()
          Returns the Location associated with the sender of the InvitePacket
 java.lang.Long getSeqNumber()
          Returns the sequence number associated with the InvitePacket
 void reject(java.lang.String r)
          Applications call this method to indicate that they reject the invitation.
 void setAppDescription(java.lang.String s)
          Sets the source description
 void setPropertiesCollection(PropertiesCollection pc)
          Assigns the source's PropertiesCollection for Data Exchange
 void setSeqNumber(java.lang.Long s)
          Assigns the sequence number for the packet.
 void setSourceID(UserID s)
          Assigns the source UserID
 void setSourceLoc(Location l)
          Assigns the source Location
 boolean wasAccepted()
          Checks whether the Invitation sent was accepted by the peer application.
 boolean wasBusy()
          Checks whether the peer application was busy.
 boolean wasConfirmed()
          Checks whether it is a confirm packet .
 boolean wasRejected()
          Checks whether the Invitation was rejected by the peer application.
 
Methods inherited from class cnrg.itx.signal.SigPacket
getCustomObject, getDestination, getMethodID, getPacketID, hasCustomObject, isAliveQuery, isConfirmPacket, isDial, isHangup, isInvitePacket, isResultPacket, isSendDTMF, setCustomObject, setDestination, setMethodType, setPacketType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvitePacket

public InvitePacket()
Default Constructor for the InvitePacket
Parameters:
None -  

InvitePacket

public InvitePacket(UserID s,
                    Location sl,
                    java.lang.String ad,
                    int meth)
Overloaded Constructor for the InvitePacket.
Parameters:
s - is the UserID object representing the source
sl - is the Location object representing the source
ad - is the String description of the Source
meth - is the integer representing the method id
Method Detail

getSenderID

public UserID getSenderID()
Returns the UserID associated with the sender of the InvitePacket
Parameters:
None -  
Returns:
UserID object of the sender

getSenderLoc

public Location getSenderLoc()
Returns the Location associated with the sender of the InvitePacket
Parameters:
None -  
Returns:
Location object of the sender

getDescription

public java.lang.String getDescription()
Returns the description of the sender of the InvitePacket
Parameters:
None -  
Returns:
a String description of the sender

getReason

public java.lang.String getReason()
Returns the reason an invitation was rejected
Parameters:
None -  
Returns:
a String describing the reason for rejecting the invitation

getPropertiesCollection

public PropertiesCollection getPropertiesCollection()
Returns the senders' PropertiesCollection
Parameters:
None -  
Returns:
senders' PropertiesCollection object

setSourceID

public void setSourceID(UserID s)
Assigns the source UserID
Parameters:
s - is the UserID object representing the sender
Returns:
void

setSourceLoc

public void setSourceLoc(Location l)
Assigns the source Location
Parameters:
l - is the Location object representing the sender's location
Returns:
void

setAppDescription

public void setAppDescription(java.lang.String s)
Sets the source description
Parameters:
s - is the String representing the sender's description
Returns:
void

setPropertiesCollection

public void setPropertiesCollection(PropertiesCollection pc)
Assigns the source's PropertiesCollection for Data Exchange
Parameters:
pc - is the PropertiesCollection object representing the sender's PropertiesCollection
Returns:
void

setSeqNumber

public void setSeqNumber(java.lang.Long s)
Assigns the sequence number for the packet. A sequence number is exchanged in the 3-way handshake
Parameters:
s - is the Long object representing the sequence number
Returns:
void

getSeqNumber

public java.lang.Long getSeqNumber()
Returns the sequence number associated with the InvitePacket
Parameters:
None -  
Returns:
the Long object representing the sequence number

accept

public void accept()
Applications call this method to indicate that they accept the invitation.
Parameters:
None -  
Returns:
void

reject

public void reject(java.lang.String r)
Applications call this method to indicate that they reject the invitation.
Parameters:
r - is the reason for rejection
Returns:
void

busy

public void busy()
Applications call this method to indicate that they are busy at present and cannot accept the invitation.
Parameters:
None -  
Returns:
void

confirm

public void confirm()
Applications call this method to confirm a sequence.
Parameters:
None -  
Returns:
void

wasAccepted

public boolean wasAccepted()
Checks whether the Invitation sent was accepted by the peer application.
Parameters:
None. -  
Returns:
TRUE if invitation was accepted, FALSE otherwise

wasRejected

public boolean wasRejected()
Checks whether the Invitation was rejected by the peer application.
Parameters:
None. -  
Returns:
TRUE if invitation was rejected, FALSE otherwise

wasBusy

public boolean wasBusy()
Checks whether the peer application was busy.
Parameters:
None. -  
Returns:
TRUE if peer was busy, FALSE otherwise

wasConfirmed

public boolean wasConfirmed()
Checks whether it is a confirm packet .
Parameters:
None. -  
Returns:
TRUE if it is a confirm packet, FALSE otherwise