cnrg.itx.gtwy
Class Line

java.lang.Object
  |
  +--cnrg.itx.gtwy.Line

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

A class that provides information regarding each Gateway line.

See Also:
Serialized Form

Constructor Summary
Line(int id, int chDev, int secChDev, java.lang.String phone)
          The line is considered available when an instance is created.
 
Method Summary
protected  boolean getAvailability()
           
protected  int getChDev()
           
 int getLineNumber()
           
 java.lang.String getPhoneNumber()
           
protected  int getSecondDev()
           
protected  void makeAvailable()
          Makes the gateway line available for a connection between a phone and computer.
protected  void makeUnAvailable()
          Makes the gateway line unavailable for another connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Line

public Line(int id,
            int chDev,
            int secChDev,
            java.lang.String phone)
The line is considered available when an instance is created.
Parameters:
id - the line's id number.
chDev - the device handler for the primary channel.
secChDev - the device handler for the second channel.
phone - the phone number associated with a line.
Method Detail

getLineNumber

public int getLineNumber()
Returns:
the designated line number of the Gateway line.

getChDev

protected int getChDev()
Returns:
the primary channel's device handler.

getSecondDev

protected int getSecondDev()
Returns:
the second channel's device handler.

getPhoneNumber

public java.lang.String getPhoneNumber()
Returns:
the extension number of the line. Used by PBX to make a connection to a phone when the Gateway calls a telephone.

getAvailability

protected boolean getAvailability()
Returns:
the availability status of the Gateway line for a phone/computer connection.

makeAvailable

protected void makeAvailable()
Makes the gateway line available for a connection between a phone and computer.

makeUnAvailable

protected void makeUnAvailable()
Makes the gateway line unavailable for another connection.