|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.co.keang.callerid.driver.CTICallerID
public class CTICallerID
Provides an interface to Crucible Technologies (CTI) Comet USB Caller ID hardware.
Once closed the connection can not be re-opened, a new CTICallerID object must be created.
Note: The "findcomet.exe" application provided by CTI must be placed in the current working directory if you want to be able to find the port(s) the hardware is attached to
Interfacing to a single hardware device is as simple as:
CTICallerID callerID = new CTICallerID();
callerID.addCallerIDListener(new ICallerIDListener()
{
public void incomingCall(CallerIDEvent event)
{
// Handle incoming calls
}
public void callerIDException(Exception e)
{
// Handle any exceptions caught by the driver
}
});
Constructor Summary | |
---|---|
CTICallerID()
Creates a caller ID interface for hardware on the first port that has hardware attached |
|
CTICallerID(CallSimulator sim)
Creates a Caller ID interface running from a phone call simulator. |
|
CTICallerID(java.lang.String comPort)
Creates a caller ID interface for hardware on the given port |
Method Summary | |
---|---|
void |
addCallerIDListener(ICallerIDListener listener)
Adds an CallerID listener. |
void |
close()
Closes the serial connection to the CTI hardware and removes all listeners |
static java.lang.String[] |
findCometPorts()
Finds the port(s) CTI Comet USB Caller ID hardware is attached to. |
static void |
main(java.lang.String[] args)
|
void |
removeCallerIDListener(ICallerIDListener listener)
Removes an CallerID listener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CTICallerID() throws gnu.io.NoSuchPortException, gnu.io.PortInUseException, gnu.io.UnsupportedCommOperationException, java.io.IOException
java.io.IOException
gnu.io.UnsupportedCommOperationException
gnu.io.PortInUseException
gnu.io.NoSuchPortException
- if auto find failed to identify any portspublic CTICallerID(java.lang.String comPort) throws gnu.io.NoSuchPortException, gnu.io.PortInUseException, gnu.io.UnsupportedCommOperationException, java.io.IOException
comPort
- the com port the hardware is attached to ie COM3
java.io.IOException
gnu.io.UnsupportedCommOperationException
gnu.io.PortInUseException
gnu.io.NoSuchPortException
public CTICallerID(CallSimulator sim)
This is used for testing purposes only.
sim
- the phone call simulatorMethod Detail |
---|
public static java.lang.String[] findCometPorts()
public void addCallerIDListener(ICallerIDListener listener)
listener
- the listener to addpublic void removeCallerIDListener(ICallerIDListener listener)
listener
- the listener to removepublic void close()
close
in interface java.io.Closeable
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |