|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.java.sip.communicator.plugin.scphone.SCPhone
public abstract class SCPhone
Bring usb phone support to sc.
Field Summary | |
---|---|
private java.util.concurrent.ExecutorService |
executor
Thread pooled executor |
private static SCPhone |
scPhone
Singleton instance of this class |
private javax.swing.event.EventListenerList |
scPhoneListeners
Collection of event listeners for the phone. |
private int |
scPhoneStatus
Status of the phone |
static int |
STATUS_OFF
phone device unavailable |
static int |
STATUS_ON
a phone device is connected and available |
Constructor Summary | |
---|---|
protected |
SCPhone()
Don't instantiate, Use SCPhone.getPhone() method instead. |
Method Summary | |
---|---|
void |
addSCPhoneListener(SCPhoneListener listener)
Add a listener to be informed of SCPhone events. |
protected void |
firePhoneCommandReceived(java.lang.String message)
Event trigger called when a command is received from the phone. |
protected void |
firePhoneCommandSent(java.lang.String message)
Event trigger called when a command is sent and has been received by the phone. |
protected void |
fireStatusChanged(int newStatus)
Fire a status change event. |
static SCPhone |
getPhone()
Initialize the unique singleton of the SCPhone . |
int |
getStatus()
Return the status . |
void |
removeSCPhoneListener(SCPhoneListener listener)
Remove a listener from the collection of listeners. |
protected abstract void |
sendCommand(java.lang.String command)
Send a command message to the phone. |
protected void |
setStatus(int newValue)
Set the status. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int STATUS_ON
public static final int STATUS_OFF
private static SCPhone scPhone
private int scPhoneStatus
private javax.swing.event.EventListenerList scPhoneListeners
private java.util.concurrent.ExecutorService executor
Constructor Detail |
---|
protected SCPhone()
SCPhone.getPhone()
method instead.
Method Detail |
---|
public static SCPhone getPhone()
SCPhone
. If this method is called when the
phone is already initialized, return the current singleton without any modification.
SCPhone
singleton used to communicate with the phone device.protected final void setStatus(int newValue)
newValue
- The new status.public final int getStatus()
protected abstract void sendCommand(java.lang.String command)
command
- the command message to send.public final void addSCPhoneListener(SCPhoneListener listener)
SCPhone
events.
listener
- the listener to add.public final void removeSCPhoneListener(SCPhoneListener listener)
listener
- The listener to remove.protected final void firePhoneCommandReceived(java.lang.String message)
message
- the message that triggered the event.protected void firePhoneCommandSent(java.lang.String message)
message
- the message that has been sent.protected final void fireStatusChanged(int newStatus)
newStatus
- the new status that triggered this event.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |