de.ilink.jtapi.makecall
Class JTAPIConnection

java.lang.Object
  extended by de.ilink.jtapi.makecall.JTAPIConnection
All Implemented Interfaces:
javax.telephony.callcontrol.CallControlCallObserver, javax.telephony.CallObserver, javax.telephony.ProviderObserver

public class JTAPIConnection
extends java.lang.Object
implements javax.telephony.callcontrol.CallControlCallObserver, javax.telephony.ProviderObserver

Connection between the application and the JTAPI server (TeamCall Server). Provides functionality for monitoring a device and makes a call with this device.

Fires property change events if the call or the provider changes.

Author:
Abdelatif Nouqrat

Constructor Summary
JTAPIConnection(java.lang.String aProviderString)
          Constructs a JTAPIConnection with the given provider string.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
           
 void callChangedEvent(javax.telephony.events.CallEv[] arg0)
          Call back function for the CallControlCallObserver
 void drop()
          Clears the currently active connection.
 void firePropertyChange(java.beans.PropertyChangeEvent e)
          Fired every time the Provider or the Call changed.
 void initializeProvider()
          Connect JTAPIConnection to the TeamCall Server.
 void makeCall(java.lang.String aDestination)
          Place a call to the given destination.
 void monitorStartForDevice(java.lang.String aDevice)
          Set a monitor for the given device (a dialing number).
 void providerChangedEvent(javax.telephony.events.ProvEv[] arg0)
          Call back function for the ProviderObserver interface
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTAPIConnection

public JTAPIConnection(java.lang.String aProviderString)
Constructs a JTAPIConnection with the given provider string. TeamCall JTAPI needs a provider string like "<port>@<IP or hostname of teamcall>;login=<username>;passwd=<password>"

Method Detail

initializeProvider

public void initializeProvider()
Connect JTAPIConnection to the TeamCall Server. You have to call this function before you can monitor a device.


monitorStartForDevice

public void monitorStartForDevice(java.lang.String aDevice)
Set a monitor for the given device (a dialing number). The user must be assoziated with this device.


makeCall

public void makeCall(java.lang.String aDestination)
Place a call to the given destination.

Parameters:
aDestination - The destination daling number.

drop

public void drop()
Clears the currently active connection. Does nothing if there is no connection.


callChangedEvent

public void callChangedEvent(javax.telephony.events.CallEv[] arg0)
Call back function for the CallControlCallObserver

Specified by:
callChangedEvent in interface javax.telephony.CallObserver

providerChangedEvent

public void providerChangedEvent(javax.telephony.events.ProvEv[] arg0)
Call back function for the ProviderObserver interface

Specified by:
providerChangedEvent in interface javax.telephony.ProviderObserver

firePropertyChange

public void firePropertyChange(java.beans.PropertyChangeEvent e)
Fired every time the Provider or the Call changed.


addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)