JSR-043: JTAPI-1.4

javax.telephony.callcenter
Interface CallCenterTrunk


public interface CallCenterTrunk

Introduction

The CallCenterTrunk interface represents a trunk on the underlying telephony hardware. Each trunk has four attributes: its name, its state, its type, and its associated Call.

The Trunk Name

The first attribute of a trunk is its string name. This name is assigned to the trunk by the underlying telephony hardware. Applications obtains the name of the trunk via the getName() method on this interface. A trunk's name does not change throughout its lifetime.

The Trunk State

The second attribute of a trunk is its state. The state indicates whether the trunk is associated with a Call (i.e. valid) or not associated with a Call (i.e. invalid). Applications obtain the state of a trunk via the getState() method on this interface. The following chart summarizes the two trunk states:

CallCenterTrunk.VALID_TRUNK The trunk is valid and associated with a Call.
CallCenterTrunk.INVALID_TRUNK The trunk is not valid and not associated with a Call.

The Trunk Type

The third attribute of a trunk is its type. The type indicates whether the trunk is an "incoming", "outgoing", or "unknown". Applications obtain the trunk type via the getType() method on this interface. The following chart summarizes the three trunk types:

CallCenterTrunk.INCOMING_TRUNK The trunk is an incoming trunk
CallCenterTrunk.OUTGOING_TRUNK The trunk is an outgoing trunk
CallCenterTrunk.UNKNOWN_TRUNK The trunk type is not known

The Associated Call

The fourth attribute of a trunk is the Call associated with it. The Call is assigned when the trunk is first created and remains the same throughout the lifetime of the trunk. Applications obtain the associated Call via the getCall() method on this interface.

Observers and Events

Applications receive an event whenever the state of the trunk changes. These events are reported via the CallCenterCallObserver interface. The CallCentTrunkValidEv event is delivered when the trunk moves to the CallCenterTrunk.VALID_TRUNK state and a CallCentTrunkInvalidEv event is devliered when the trunk moves to the CallCenterTrunk.INALID_TRUNK state.

See Also:
CallCenterCall, CallCenterCallObserver, CallCentTrunkValidEv, CallCentTrunkInvalidEv

Field Summary
static int INCOMING_TRUNK
          Trunk type: The trunk is incoming.
static int INVALID_TRUNK
          Trunk state: The trunk is invalid.
static int OUTGOING_TRUNK
          Trunk type: The trunk is outgoing.
static int UNKNOWN_TRUNK
          Trunk type: The trunk is unknown.
static int VALID_TRUNK
          Trunk state: The trunk is valid.
 
Method Summary
 Call getCall()
          Returns the Call associated with this trunk.
 java.lang.String getName()
          Returns the name of the trunk.
 int getState()
          Returns the current state of the Trunk.
 int getType()
          Returns the type of trunk.
 

Field Detail

INVALID_TRUNK

public static final int INVALID_TRUNK
Trunk state: The trunk is invalid.

VALID_TRUNK

public static final int VALID_TRUNK
Trunk state: The trunk is valid.

INCOMING_TRUNK

public static final int INCOMING_TRUNK
Trunk type: The trunk is incoming.

OUTGOING_TRUNK

public static final int OUTGOING_TRUNK
Trunk type: The trunk is outgoing.

UNKNOWN_TRUNK

public static final int UNKNOWN_TRUNK
Trunk type: The trunk is unknown.
Method Detail

getName

public java.lang.String getName()
Returns the name of the trunk. This name is assigned by the underlying telephony hardware.

Returns:
The name of the trunk.

getState

public int getState()
Returns the current state of the Trunk.

Returns:
The current state of the trunk.

getType

public int getType()
Returns the type of trunk.

Returns:
The type of trunk.

getCall

public Call getCall()
Returns the Call associated with this trunk. This Call reference remains valid throughout the lifetime of the trunk, despite the current state of the trunk.

Returns:
The Call associated with this trunk.

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org