JSR-043: JTAPI-1.4

javax.telephony
Interface ConnectionListener

All Superinterfaces:
CallListener, java.util.EventListener
All Known Subinterfaces:
CallControlConnectionListener, CallControlTerminalConnectionListener, TerminalConnectionListener

public interface ConnectionListener
extends CallListener

This interface is an extension of the CallListener interface, and reports state changes both of the Call and its Connections.

Introduction

As is true for the CallListener interface, specific Connection object state changes are reported to specific corresponding ConnectionListener methods. The eventID carried by the event (a ConnectionEvent) corresponds to the method called, and indicates which specific state change occurred.

Adding a Listener to a Call

Applications may add a ConnectionListener to a Call via one of several mechanisms. They may directly add a ConnectionListener by implementing the ConnectionListener interface, and then invoking the Call.addCallListener method. Applications may also add ConnectionListener to Calls indirectly by implementing the ConnectionListener interface, and then invoking the Address.addCallListener and Terminal.addCallListener methods. These methods add the given listener to the Call when the Call comes to the Address or Terminal. See the specifications for Call, Address, and Terminal for more information.

Call State Changes and Connection Events

In the core package, an event is delivered whenever the Call changes state. An event is delivered to a method of this interface specifically when a Connection object changes state. The method called, and the event ID reported, indicate the new Call state. The methods in this interface are: connectionAlerting, connectionConnected, connectionDisconnected, connectionFailed, connectionInProgress, and connectionUnknown.

Connection Events

All events pertaining to the Connection object are reported on this interface. Connection events are instances of the ConnectionEvent interface, which in turn, extends the CallEvent event interface. In the core package, an event is delivered to this interface whenever a Connection changes state.

See Also:
CallEvent, Connection, ConnectionEvent, TerminalConnectionEvent, MetaEvent, CallListener, TerminalConnectionListener

Method Summary
 void connectionAlerting(ConnectionEvent event)
          The connectionAlerting method is called to report that the state of the Connection object has changed to Connection.ALERTING.
 void connectionConnected(ConnectionEvent event)
          The connectionConnected method is called to report that the state of the Connection object has changed to Connection.CONNECTED.
 void connectionCreated(ConnectionEvent event)
          The connectionCreated method is called to report that a new Connection object has been created.
 void connectionDisconnected(ConnectionEvent event)
          The connectionDisconnected method is called to report that the state of the Connection object has changed to Connection.DISCONNECTED.
 void connectionFailed(ConnectionEvent event)
          The connectionFailed method is called to report that the state of the Connection object has changed to Connection.FAILED.
 void connectionInProgress(ConnectionEvent event)
          The connectionInProgress method is called to report that the state of the Connection object has changed to Connection.IN_PROGRESS.
 void connectionUnknown(ConnectionEvent event)
          The connectionUnknown method is called to report that the state of the Connection object has changed to Connection.UNKNOWN.
 
Methods inherited from interface javax.telephony.CallListener
callActive, callEventTransmissionEnded, callInvalid, multiCallMetaMergeEnded, multiCallMetaMergeStarted, multiCallMetaTransferEnded, multiCallMetaTransferStarted, singleCallMetaProgressEnded, singleCallMetaProgressStarted, singleCallMetaSnapshotEnded, singleCallMetaSnapshotStarted
 

Method Detail

connectionAlerting

public void connectionAlerting(ConnectionEvent event)
The connectionAlerting method is called to report that the state of the Connection object has changed to Connection.ALERTING.

Parameters:
event - A ConnectionEvent with eventID Connection.ALERTING.

connectionConnected

public void connectionConnected(ConnectionEvent event)
The connectionConnected method is called to report that the state of the Connection object has changed to Connection.CONNECTED.

Parameters:
event - A ConnectionEvent with eventID Connection.CONNECTED.

connectionCreated

public void connectionCreated(ConnectionEvent event)
The connectionCreated method is called to report that a new Connection object has been created.

Parameters:
event - A ConnectionEvent with eventID ConnectionEvent.IDLE.

connectionDisconnected

public void connectionDisconnected(ConnectionEvent event)
The connectionDisconnected method is called to report that the state of the Connection object has changed to Connection.DISCONNECTED.

Parameters:
event - A ConnectionEvent with eventID Connection.DISCONNECTED.

See Also:
Connection, ConnectionEvent

connectionFailed

public void connectionFailed(ConnectionEvent event)
The connectionFailed method is called to report that the state of the Connection object has changed to Connection.FAILED.

Parameters:
event - A ConnectionEvent with eventID Connection.FAILED.

See Also:
Connection, ConnectionEvent

connectionInProgress

public void connectionInProgress(ConnectionEvent event)
The connectionInProgress method is called to report that the state of the Connection object has changed to Connection.IN_PROGRESS.

Parameters:
event - A ConnectionEvent with eventID Connection.IN_PROGRESS.

See Also:
Connection, Connection

connectionUnknown

public void connectionUnknown(ConnectionEvent event)
The connectionUnknown method is called to report that the state of the Connection object has changed to Connection.UNKNOWN.

Parameters:
event - A ConnectionEvent with eventID Connection.UNKNOWN.

See Also:
Connection, ConnectionEvent

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org