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 SignalConnection

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

public class SignalConnection
extends java.lang.Object

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
`protected static int` | `myCurrentState` Members for complete Dialing Control
`protected cnrg.itx.signal.KeepAlive` | `myKeepAlive` Keepalive thread

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, cnrg.itx.signal.DialThread d)` Constructor

Method Summary
`void` | `abortCall()` Aborts the current dial sequence.
`void` | `close()`
`cnrg.itx.datax.Connection` | `getConnection()` Returns the data exchange connection
`int` | `getCurrentState()`
`cnrg.itx.datax.Channel` | `getInputChannel()`
`java.lang.String` | `getIP()` Returns the IP address of the peer
`cnrg.itx.signal.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(cnrg.itx.signal.DialThread d)` Sets the DialThread to be used for the call.
`void` | `setInputChannel(cnrg.itx.datax.Channel c)`
`void` | `setIP(java.lang.String ip)` Sets the peer's IP address
`void` | `setKeepAlive(cnrg.itx.signal.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` | `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
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### IDLE

    protected static final int IDLE

  SignalConnection object is idle

### DIALING

    protected static final int DIALING

  SignalConnection object is dialing

### CONNECTED

    protected static final int CONNECTED

  SignalConnection object is connected to an application

### myKeepAlive

    protected cnrg.itx.signal.KeepAlive myKeepAlive

  Keepalive thread

### myCurrentState

    protected static int myCurrentState

  Members for complete Dialing Control

Constructor Detail

### SignalConnection

    public SignalConnection()

  Default Constructor
  Parameters:
    `None.` -

### SignalConnection

    public SignalConnection(cnrg.itx.datax.Connection c,
                            java.lang.String ip,
                            int p)

  Constructor
  Parameters:
    `c` - is the connection for data exchange
    `ip` - is the IP address of peer
    `p` - is the listening port of peer

### SignalConnection

    public SignalConnection(cnrg.itx.datax.Connection c,
                            java.lang.String ip,
                            int p,
                            cnrg.itx.ds.UserID puid,
                            cnrg.itx.signal.DialThread d)

  Constructor
  Parameters:
    `c` - is the connection for data exchange
    `ip` - is the IP address of peer
    `p` - is the listening port of peer
    `puid` - is the userID of the peer
    `d` - is the DialThread to make the call
  See Also:
    `DialThread`

Method Detail

### setCurrentState

    protected void setCurrentState(int s)

  This method sets the current state of the call
  Parameters:
    `s` - is the integer representation of the state
  Returns:
    void.

### getConnection

    public cnrg.itx.datax.Connection getConnection()

  Returns the data exchange connection
  Parameters:
    `None` -
  Returns:
    Connection object

### getIP

    public java.lang.String getIP()

  Returns the IP address of the peer
  Parameters:
    `None` -
  Returns:
    String representation of peer's IP address

### getPort

    public int getPort()

  Returns the listening port of the peer
  Parameters:
    `None` -
  Returns:
    integer representation of peer's listening port

### getSeqNumber

    public java.lang.Long getSeqNumber()

  Returns the uniques sequence number being used for this call
  Parameters:
    `None` -
  Returns:
    Long object representing the sequence number

### getPeerSeqNumber

    public java.lang.Long getPeerSeqNumber()

  Returns the uniques sequence number being used by the peer for this call
  Parameters:
    `None` -
  Returns:
    Long object representing the sequence number being used by the peer

### setIP

    public void setIP(java.lang.String ip)

  Sets the peer's IP address
  Parameters:
    `ip` - is the String representation of peer's IP address
  Returns:
    void.

### setPort

    public void setPort(int p)

  Sets the peer's listening port
  Parameters:
    `p` - is the integer representation of peer's port
  Returns:
    void.

### setSeqNumber

    public void setSeqNumber(java.lang.Long s)

  Sets the sequence number for this connection
  Parameters:
    `s` - is the Long representation of the sequence number
  Returns:
    void.

### setPeerSeqNumber

    public void setPeerSeqNumber(java.lang.Long s)

  Sets the sequence number being used by the peer for this connection
  Parameters:
    `s` - is the Long representation of the sequence number being used by the peer
  Returns:
    void.

### setKeepAlive

    public void setKeepAlive(cnrg.itx.signal.KeepAlive ka)

  Sets the KeepAlive object handle
  Parameters:
    `ks` - is the KeepAlive object
  Returns:
    void.

### getKeepAlive

    public cnrg.itx.signal.KeepAlive getKeepAlive()

  Returns:
    the KeepAlive object

### setKeepAliveTime

    public void setKeepAliveTime(int timeout)

  Sets the KeepAlive object's wait period
  Parameters:
    `timeout` - is the wait period in milli seconds
  Returns:
    void.

### setPeerUID

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

  Sets the peer's UserID
  Parameters:
    `uid` - is the UserID object representing the peer's userID.
  Returns:
    void.

### getPeerUID

    public cnrg.itx.ds.UserID getPeerUID()

  Returns:
    the peer UserID object

### setDialer

    public void setDialer(cnrg.itx.signal.DialThread d)

  Sets the DialThread to be used for the call.
  Parameters:
    `d` - is the instantiated DialThread object
  Returns:
    void.

### isIdle

    public boolean isIdle()

  Returns:
    TRUE if the current state is idle, FALSE otherwise.

### isDialing

    public boolean isDialing()

  Returns:
    TRUE if the current state is Dialing, FALSE otherwise.

### isConnected

    public boolean isConnected()

  Returns:
    TRUE if the current state is Connected, FALSE otherwise.

### getCurrentState

    public int getCurrentState()

  Returns:
    the current state

### setConnection

    public void setConnection(cnrg.itx.datax.Connection c)

  Sets the conection object to use for data exchange
  Parameters:
    `c` - is the Connection object to be used
  Returns:
    void.

### startCall

    public void startCall()

  Starts dialing the peer.
  Parameters:
    `None.` -
  Returns:
    void

### abortCall

    public void abortCall()

  Aborts the current dial sequence.
  Parameters:
    `None.` -
  Returns:
    void.

### startKeepAlive

    public void startKeepAlive(DesktopSignaling ds)

  Creates and starts the KeepAlive thread for the connection
  Parameters:
    `ds` - the handle to DesktopSignaling.
  Returns:
    void.

### open

    public void open()
              throws cnrg.itx.datax.DataException

  See Also:
    `cnrg.itx.datax.Connection.open()`

### close

    public void close()
               throws cnrg.itx.datax.DataException

  See Also:
    `cnrg.itx.datax.Connection.close()`

### getInputChannel

    public cnrg.itx.datax.Channel getInputChannel()

  See Also:
    `cnrg.itx.datax.Connection.getInputChannel()`

### getOutputChannel

    public cnrg.itx.datax.Channel getOutputChannel()

  See Also:
    `cnrg.itx.datax.Connection.getOutputChannel()`

### setInputChannel

    public void setInputChannel(cnrg.itx.datax.Channel c)

  See Also:
    `cnrg.itx.datax.Connection.setInputChannel(Channel c)`

### setOutputChannel

    public void setOutputChannel(cnrg.itx.datax.Channel c)

  See Also:
    `cnrg.itx.datax.Connection.setOutputChannel(Channel c)`

### getStatistics

    public cnrg.itx.datax.Stats getStatistics()

  See Also:
    `cnrg.itx.datax.Connection.getStatistics()`

### getProperties

    public cnrg.itx.datax.PropertiesCollection getProperties()

  See Also:
    `cnrg.itx.datax.Connection.getProperties()`

### setProperties

    public void setProperties(cnrg.itx.datax.PropertiesCollection pc)

  See Also:
    `cnrg.itx.datax.Connection.setProperties(PropertiesCollection pc)`

### setPeerProperties

    public void setPeerProperties(cnrg.itx.datax.PropertiesCollection pc)
                           throws cnrg.itx.datax.DataException

  See Also:
    `cnrg.itx.datax.Connection.setPeerProperties(PropertiesCollection pc)`

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