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.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

Field Summary
`private boolean` | `isAvailable` true if line is available to make a connection on; false otherwise.
`private int` | `lineNumber` The designated line number of the line.
`private int` | `myChDev` The device handler for the primary channel.
`private java.lang.String` | `phoneNumber` The phone number used to reach the line.
`private int` | `secondChDev` The device handler for the second channel.

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, registerNatives, toString, wait, wait, wait`

Field Detail

### lineNumber

    private int lineNumber

  The designated line number of the line.

### myChDev

    private int myChDev

  The device handler for the primary channel.

### secondChDev

    private int secondChDev

  The device handler for the second channel. If a channel is already full duplex, this would be the same as the device handler for the primary channel.

### phoneNumber

    private java.lang.String phoneNumber

  The phone number used to reach the line.

### isAvailable

    private boolean isAvailable

  true if line is available to make a connection on; false otherwise.

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.

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