de.ilink.cti.cstajtapi
Class TerminalConnectionImpl

java.lang.Object
  extended by de.ilink.cti.cstajtapi.TerminalConnectionImpl
All Implemented Interfaces:
javax.telephony.callcontrol.CallControlTerminalConnection, javax.telephony.callcontrol.capabilities.CallControlTerminalConnectionCapabilities, javax.telephony.capabilities.TerminalConnectionCapabilities, javax.telephony.TerminalConnection

public class TerminalConnectionImpl
extends java.lang.Object
implements javax.telephony.callcontrol.CallControlTerminalConnection, javax.telephony.callcontrol.capabilities.CallControlTerminalConnectionCapabilities

Implementation of a TerminalConnection connected to a monitored device.

Author:
lars@ilink.de

Field Summary
 
Fields inherited from interface javax.telephony.callcontrol.CallControlTerminalConnection
BRIDGED, DROPPED, HELD, IDLE, INUSE, RINGING, TALKING, UNKNOWN
 
Fields inherited from interface javax.telephony.TerminalConnection
ACTIVE, PASSIVE
 
Method Summary
 void answer()
          Answers an inbound call.
 boolean canAnswer()
           
 boolean canHold()
           
 boolean canJoin()
           
 boolean canLeave()
           
 boolean canUnhold()
           
 int getCallControlState()
           
 javax.telephony.capabilities.TerminalConnectionCapabilities getCapabilities()
           
 javax.telephony.Connection getConnection()
           
protected  de.ilink.cti.cstajtapi.interfaces.JTCSTAConnection getJTCSTAConnection()
           
 int getState()
           
 javax.telephony.Terminal getTerminal()
           
 javax.telephony.capabilities.TerminalConnectionCapabilities getTerminalConnectionCapabilities(javax.telephony.Terminal arg0, javax.telephony.Address arg1)
          Deprecated.  
 void hold()
          Puts a call on hold.
 void join()
          This method is not supported by the current implementation and will throw a MethodNotSupportedException.
 void leave()
          This method is not supported by the current implementation and will throw a MethodNotSupportedException.
protected  void sendCreationEvent(java.lang.String aCause, de.ilink.cti.cstajtapi.events.JTAPIEventQueue anEventQueue)
           
 java.lang.String toString()
           
 void transformToDroppedState(java.lang.String aCause, de.ilink.cti.cstajtapi.events.JTAPIEventQueue anEventQueue)
           
 void transformToHeldState(java.lang.String aCause, de.ilink.cti.cstajtapi.events.JTAPIEventQueue anEventQueue)
           
 void transformToRingingState(java.lang.String aCause, de.ilink.cti.cstajtapi.events.JTAPIEventQueue anEventQueue)
           
 void transformToTalkingState(java.lang.String aCause, de.ilink.cti.cstajtapi.events.JTAPIEventQueue anEventQueue)
           
 void unhold()
          Retreives a previously held call.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getTerminal

public javax.telephony.Terminal getTerminal()
Specified by:
getTerminal in interface javax.telephony.TerminalConnection
See Also:
TerminalConnection.getTerminal()

getConnection

public javax.telephony.Connection getConnection()
Specified by:
getConnection in interface javax.telephony.TerminalConnection
See Also:
TerminalConnection.getConnection()

getJTCSTAConnection

protected de.ilink.cti.cstajtapi.interfaces.JTCSTAConnection getJTCSTAConnection()

answer

public void answer()
            throws javax.telephony.PrivilegeViolationException,
                   javax.telephony.ResourceUnavailableException,
                   javax.telephony.MethodNotSupportedException,
                   javax.telephony.InvalidStateException
Answers an inbound call.

Specified by:
answer in interface javax.telephony.TerminalConnection
Throws:
javax.telephony.PrivilegeViolationException
javax.telephony.ResourceUnavailableException
javax.telephony.MethodNotSupportedException
javax.telephony.InvalidStateException
See Also:
TerminalConnection.answer()

getCapabilities

public javax.telephony.capabilities.TerminalConnectionCapabilities getCapabilities()
Specified by:
getCapabilities in interface javax.telephony.TerminalConnection
See Also:
TerminalConnection.getCapabilities()

getTerminalConnectionCapabilities

public javax.telephony.capabilities.TerminalConnectionCapabilities getTerminalConnectionCapabilities(javax.telephony.Terminal arg0,
                                                                                                     javax.telephony.Address arg1)
                                                                                              throws javax.telephony.InvalidArgumentException,
                                                                                                     javax.telephony.PlatformException
Deprecated. 

Specified by:
getTerminalConnectionCapabilities in interface javax.telephony.TerminalConnection
Throws:
javax.telephony.InvalidArgumentException
javax.telephony.PlatformException
See Also:
TerminalConnection.getTerminalConnectionCapabilities(Terminal, Address)

hold

public void hold()
          throws javax.telephony.InvalidStateException,
                 javax.telephony.MethodNotSupportedException,
                 javax.telephony.PrivilegeViolationException,
                 javax.telephony.ResourceUnavailableException
Puts a call on hold. NOTE: Some device / switch combinations don't support HoldCall. In this case, a MethodNotSupportedException will be thrown.

Specified by:
hold in interface javax.telephony.callcontrol.CallControlTerminalConnection
Throws:
javax.telephony.InvalidStateException
javax.telephony.MethodNotSupportedException
javax.telephony.PrivilegeViolationException
javax.telephony.ResourceUnavailableException
See Also:
CallControlTerminalConnection.hold()

join

public void join()
          throws javax.telephony.InvalidStateException,
                 javax.telephony.MethodNotSupportedException,
                 javax.telephony.PrivilegeViolationException,
                 javax.telephony.ResourceUnavailableException
This method is not supported by the current implementation and will throw a MethodNotSupportedException. Do not call this method.

Specified by:
join in interface javax.telephony.callcontrol.CallControlTerminalConnection
Throws:
javax.telephony.InvalidStateException
javax.telephony.MethodNotSupportedException
javax.telephony.PrivilegeViolationException
javax.telephony.ResourceUnavailableException
See Also:
CallControlTerminalConnection.join()

leave

public void leave()
           throws javax.telephony.InvalidStateException,
                  javax.telephony.MethodNotSupportedException,
                  javax.telephony.PrivilegeViolationException,
                  javax.telephony.ResourceUnavailableException
This method is not supported by the current implementation and will throw a MethodNotSupportedException. Do not call this method.

Specified by:
leave in interface javax.telephony.callcontrol.CallControlTerminalConnection
Throws:
javax.telephony.InvalidStateException
javax.telephony.MethodNotSupportedException
javax.telephony.PrivilegeViolationException
javax.telephony.ResourceUnavailableException
See Also:
CallControlTerminalConnection.leave()

unhold

public void unhold()
            throws javax.telephony.InvalidStateException,
                   javax.telephony.MethodNotSupportedException,
                   javax.telephony.PrivilegeViolationException,
                   javax.telephony.ResourceUnavailableException
Retreives a previously held call. NOTE: Some device / switch combinations don't support RetrieveCall. In this case, a MethodNotSupportedException will be thrown.

Specified by:
unhold in interface javax.telephony.callcontrol.CallControlTerminalConnection
Throws:
javax.telephony.InvalidStateException
javax.telephony.MethodNotSupportedException
javax.telephony.PrivilegeViolationException
javax.telephony.ResourceUnavailableException
See Also:
CallControlTerminalConnection.unhold()

getCallControlState

public int getCallControlState()
Specified by:
getCallControlState in interface javax.telephony.callcontrol.CallControlTerminalConnection

getState

public int getState()
Specified by:
getState in interface javax.telephony.TerminalConnection

transformToDroppedState

public void transformToDroppedState(java.lang.String aCause,
                                    de.ilink.cti.cstajtapi.events.JTAPIEventQueue anEventQueue)

transformToHeldState

public void transformToHeldState(java.lang.String aCause,
                                 de.ilink.cti.cstajtapi.events.JTAPIEventQueue anEventQueue)

transformToRingingState

public void transformToRingingState(java.lang.String aCause,
                                    de.ilink.cti.cstajtapi.events.JTAPIEventQueue anEventQueue)

transformToTalkingState

public void transformToTalkingState(java.lang.String aCause,
                                    de.ilink.cti.cstajtapi.events.JTAPIEventQueue anEventQueue)

sendCreationEvent

protected void sendCreationEvent(java.lang.String aCause,
                                 de.ilink.cti.cstajtapi.events.JTAPIEventQueue anEventQueue)

canHold

public boolean canHold()
Specified by:
canHold in interface javax.telephony.callcontrol.capabilities.CallControlTerminalConnectionCapabilities
See Also:
CallControlTerminalConnectionCapabilities.canHold()

canJoin

public boolean canJoin()
Specified by:
canJoin in interface javax.telephony.callcontrol.capabilities.CallControlTerminalConnectionCapabilities
See Also:
CallControlTerminalConnectionCapabilities.canJoin()

canLeave

public boolean canLeave()
Specified by:
canLeave in interface javax.telephony.callcontrol.capabilities.CallControlTerminalConnectionCapabilities
See Also:
CallControlTerminalConnectionCapabilities.canLeave()

canUnhold

public boolean canUnhold()
Specified by:
canUnhold in interface javax.telephony.callcontrol.capabilities.CallControlTerminalConnectionCapabilities
See Also:
CallControlTerminalConnectionCapabilities.canUnhold()

canAnswer

public boolean canAnswer()
Specified by:
canAnswer in interface javax.telephony.capabilities.TerminalConnectionCapabilities
See Also:
TerminalConnectionCapabilities.canAnswer()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2002-2007, 2009, 2013, 2015-2019 by ilink Kommunikationssysteme GmbH
info@ilink.de