|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cnrg.itx.signal.SignalConnection
This class contains vital signaling information to identify and hangup peer applications. It also contains the data exchange connection that allows for data transfer.
Field Summary | |
protected static int |
CONNECTED
SignalConnection object is connected to an application |
protected static int |
DIALING
SignalConnection object is dialing |
protected static int |
IDLE
SignalConnection object is idle |
private boolean |
isMyInvitePacket
true if this DesktopSignaling originated the InvitePacket; false otherwise |
private cnrg.itx.datax.Connection |
myC
Connection object for data exchange |
private java.lang.Long |
myConnSeqNumber
Unique Sequence # for this call |
protected static int |
myCurrentState
Members for complete Dialing Control |
private DialThread |
myDialer
DialThread handle |
private InvitePacket |
myInvite
The InvitePacket corresponding to the connection |
protected KeepAlive |
myKeepAlive
Keepalive thread |
private java.lang.String |
myPeerIP
Peer's IP Address |
private int |
myPeerPort
Peer's listening port |
private java.lang.Long |
myPeerSeqNumber
Unique Sequence # being used by peer for this call |
private cnrg.itx.ds.UserID |
myPeerUID
Peer's User ID |
Constructor Summary | |
SignalConnection()
Default Constructor |
|
SignalConnection(cnrg.itx.datax.Connection c,
java.lang.String ip,
int p)
Constructor |
|
SignalConnection(cnrg.itx.datax.Connection c,
java.lang.String ip,
int p,
cnrg.itx.ds.UserID puid,
DialThread d)
Constructor |
Method Summary | |
void |
abortCall()
Aborts the current dial sequence. |
boolean |
checkIfMyInvite()
Returns whether or not the InvitePacket originated with the current DesktopSignaling. |
void |
close()
|
cnrg.itx.datax.Connection |
getConnection()
Returns the data exchange connection |
int |
getCurrentState()
|
cnrg.itx.datax.Channel |
getInputChannel()
|
InvitePacket |
getInvite()
Returns the InvitePacket associated with the current connection. |
java.lang.String |
getIP()
Returns the IP address of the peer |
KeepAlive |
getKeepAlive()
|
cnrg.itx.datax.Channel |
getOutputChannel()
|
java.lang.Long |
getPeerSeqNumber()
Returns the uniques sequence number being used by the peer for this call |
cnrg.itx.ds.UserID |
getPeerUID()
|
int |
getPort()
Returns the listening port of the peer |
cnrg.itx.datax.PropertiesCollection |
getProperties()
|
java.lang.Long |
getSeqNumber()
Returns the uniques sequence number being used for this call |
cnrg.itx.datax.Stats |
getStatistics()
|
boolean |
isConnected()
|
boolean |
isDialing()
|
boolean |
isIdle()
|
void |
open()
|
void |
setConnection(cnrg.itx.datax.Connection c)
Sets the conection object to use for data exchange |
protected void |
setCurrentState(int s)
This method sets the current state of the call |
void |
setDialer(DialThread d)
Sets the DialThread to be used for the call. |
void |
setInputChannel(cnrg.itx.datax.Channel c)
|
void |
setInvite(InvitePacket ip)
Sets the InvitePacket associated with the connection. |
void |
setIP(java.lang.String ip)
Sets the peer's IP address |
void |
setKeepAlive(KeepAlive ka)
Sets the KeepAlive object handle |
void |
setKeepAliveTime(int timeout)
Sets the KeepAlive object's wait period |
void |
setOutputChannel(cnrg.itx.datax.Channel c)
|
void |
setPeerProperties(cnrg.itx.datax.PropertiesCollection pc)
|
void |
setPeerSeqNumber(java.lang.Long s)
Sets the sequence number being used by the peer for this connection |
void |
setPeerUID(cnrg.itx.ds.UserID uid)
Sets the peer's UserID |
void |
setPort(int p)
Sets the peer's listening port |
void |
setProperties(cnrg.itx.datax.PropertiesCollection pc)
|
void |
setSeqNumber(java.lang.Long s)
Sets the sequence number for this connection |
void |
setSourceInvite(boolean ifSource)
Sets whether or not this DesktopSignaling created the InvitePacket. |
void |
startCall()
Starts dialing the peer. |
void |
startKeepAlive(DesktopSignaling ds)
Creates and starts the KeepAlive thread for the connection |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected static final int IDLE
protected static final int DIALING
protected static final int CONNECTED
private InvitePacket myInvite
private boolean isMyInvitePacket
private cnrg.itx.datax.Connection myC
private java.lang.String myPeerIP
private int myPeerPort
private cnrg.itx.ds.UserID myPeerUID
private java.lang.Long myConnSeqNumber
private java.lang.Long myPeerSeqNumber
protected KeepAlive myKeepAlive
protected static int myCurrentState
private DialThread myDialer
Constructor Detail |
public SignalConnection()
None.
- public SignalConnection(cnrg.itx.datax.Connection c, java.lang.String ip, int p)
c
- is the connection for data exchangeip
- is the IP address of peerp
- is the listening port of peerpublic SignalConnection(cnrg.itx.datax.Connection c, java.lang.String ip, int p, cnrg.itx.ds.UserID puid, DialThread d)
c
- is the connection for data exchangeip
- is the IP address of peerp
- is the listening port of peerpuid
- is the userID of the peerd
- is the DialThread to make the callDialThread
Method Detail |
protected void setCurrentState(int s)
s
- is the integer representation of the statepublic InvitePacket getInvite()
public boolean checkIfMyInvite()
public cnrg.itx.datax.Connection getConnection()
None
- public java.lang.String getIP()
None
- public int getPort()
None
- public java.lang.Long getSeqNumber()
None
- public java.lang.Long getPeerSeqNumber()
None
- public void setIP(java.lang.String ip)
ip
- is the String representation of peer's IP addresspublic void setPort(int p)
p
- is the integer representation of peer's portpublic void setSeqNumber(java.lang.Long s)
s
- is the Long representation of the sequence numberpublic void setPeerSeqNumber(java.lang.Long s)
s
- is the Long representation of the sequence number being used by the peerpublic void setKeepAlive(KeepAlive ka)
ks
- is the KeepAlive objectpublic KeepAlive getKeepAlive()
public void setKeepAliveTime(int timeout)
timeout
- is the wait period in milli secondspublic void setPeerUID(cnrg.itx.ds.UserID uid)
uid
- is the UserID object representing the peer's userID.public cnrg.itx.ds.UserID getPeerUID()
public void setDialer(DialThread d)
d
- is the instantiated DialThread objectpublic boolean isIdle()
public boolean isDialing()
public boolean isConnected()
public int getCurrentState()
public void setConnection(cnrg.itx.datax.Connection c)
c
- is the Connection object to be usedpublic void setInvite(InvitePacket ip)
ip
- the InvitePacketpublic void setSourceInvite(boolean ifSource)
ifSource
- true if this DesktopSignaling created the InvitePacket; false otherwisepublic void startCall()
None.
- public void abortCall()
None.
- public void startKeepAlive(DesktopSignaling ds)
ds
- the handle to DesktopSignaling.public void open() throws cnrg.itx.datax.DataException
cnrg.itx.datax.Connection.open()
public void close() throws cnrg.itx.datax.DataException
cnrg.itx.datax.Connection.close()
public cnrg.itx.datax.Channel getInputChannel()
cnrg.itx.datax.Connection.getInputChannel()
public cnrg.itx.datax.Channel getOutputChannel()
cnrg.itx.datax.Connection.getOutputChannel()
public void setInputChannel(cnrg.itx.datax.Channel c)
cnrg.itx.datax.Connection.setInputChannel(Channel c)
public void setOutputChannel(cnrg.itx.datax.Channel c)
cnrg.itx.datax.Connection.setOutputChannel(Channel c)
public cnrg.itx.datax.Stats getStatistics()
cnrg.itx.datax.Connection.getStatistics()
public cnrg.itx.datax.PropertiesCollection getProperties()
cnrg.itx.datax.Connection.getProperties()
public void setProperties(cnrg.itx.datax.PropertiesCollection pc)
cnrg.itx.datax.Connection.setProperties(PropertiesCollection pc)
public void setPeerProperties(cnrg.itx.datax.PropertiesCollection pc) throws cnrg.itx.datax.DataException
cnrg.itx.datax.Connection.setPeerProperties(PropertiesCollection pc)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |