|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.phidgets.Manager
This class represents a Phidget Manager. The Phidget manager is a way to keep track of attached phidgets, it will send Attach and Detach events as Phidgets are added and removed fromt the system.
The Phidget manager deals in base Phidget objects. These objects are not actually connected to opened Phidgets but can be used to get serial number, name, version, etc.
Constructor Summary | |
Manager()
The default constructor. |
Method Summary | |
void |
addAttachListener(AttachListener l)
Adds an attach listener. |
void |
addDetachListener(DetachListener l)
Adds a detach listener. |
void |
addServerConnectListener(ServerConnectListener l)
Adds an serverConnect listener. |
void |
addServerDisconnectListener(ServerDisconnectListener l)
Adds an serverDisconnect listener. |
void |
close()
Shuts down the Phidget Manager. |
java.util.Vector |
getPhidgets()
Returns a list of Phidgets attached to the host computer. |
java.lang.String |
getServerAddress()
Returns the Address of a Phidget Webservice when this Manager was opened as remote. |
java.lang.String |
getServerID()
Returns the Server ID of a Phidget Webservice when this Manager was opened as remote. |
int |
getServerPort()
Returns the Port of a Phidget Webservice when this Manager was opened as remote. |
boolean |
isAttached()
Returns the attached status of this Manager. |
boolean |
isAttachedToServer()
Returns the network attached status for remotely opened Phidgets. |
void |
open()
Starts the PhidgetManager. |
void |
open(java.lang.String serverID)
Open this Manager remotely using a Server ID. |
void |
open(java.lang.String ipAddress,
int port)
Open this Manager remotely using an IP Address. |
void |
open(java.lang.String ipAddress,
int port,
java.lang.String password)
Open this Manager remotely and securely, using an IP Address. |
void |
open(java.lang.String serverID,
java.lang.String password)
Open this Manager remotely and securely, using a Server ID. |
void |
removeAttachListener(AttachListener l)
Removes an attach listener. |
void |
removeDetachListener(DetachListener l)
Removes a detach listener. |
void |
removeServerConnectListener(ServerConnectListener l)
Removes an serverConnect listener. |
void |
removeServerDisconnectListener(ServerDisconnectListener l)
Removes an serverDisconnect listener. |
java.lang.String |
toString()
Return a Sring describing this manager. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Manager() throws PhidgetException
open
still needs to be called
to actually receive event notifications.
Method Detail |
public final java.lang.String getServerAddress() throws PhidgetException
PhidgetException
- if this Manager was not opened.public final java.lang.String getServerID() throws PhidgetException
PhidgetException
- if this Manager was not opened.public final int getServerPort() throws PhidgetException
PhidgetException
- if this Manager was not opened.public final boolean isAttached() throws PhidgetException
PhidgetException
- If this Manager is not opened.public final boolean isAttachedToServer() throws PhidgetException
PhidgetException
- If this Phidget is not opened.public final void open() throws PhidgetException
close
is called.
PhidgetException
public final void open(java.lang.String ipAddress, int port, java.lang.String password) throws PhidgetException
This method is the same as open(String ipAddress, int port)
, except that it specifies a password.
This password can be set as a parameter when starting the Phidget Webservice.
PhidgetException
public final void open(java.lang.String ipAddress, int port) throws PhidgetException
This version of open is network based.
ipAddress
- IP Address or hostname of the Phidget Webserviceport
- Port of the Phidget Webservice
PhidgetException
- if the Phidget Webservice cannot be contactedpublic final void open(java.lang.String serverID, java.lang.String password) throws PhidgetException
This method is the same as open(String serverID)
, except that it specifies a password.
This password can be set as a parameter when starting the Phidget Webservice.
PhidgetException
public final void open(java.lang.String serverID) throws PhidgetException
This version of open is network based.
ServerID can be NULL to get a listing of all Phidgets on all Servers
serverID
- ServerID of the Phidget Webservice
PhidgetException
public final void close() throws PhidgetException
PhidgetException
public final void addAttachListener(AttachListener l)
There is no limit on the number of attach handlers that can be registered for a particular Phidget.
l
- An implemetation of the AttachListener
interfacepublic final void removeAttachListener(AttachListener l)
public final void addDetachListener(DetachListener l)
There is no limit on the number of detach handlers that can be registered for a particular Phidget.
l
- An implemetation of the DetachListener
interfacepublic final void removeDetachListener(DetachListener l)
public final void addServerConnectListener(ServerConnectListener l)
There is no limit on the number of serverConnect handlers that can be registered for a particular Manager.
l
- An implemetation of the ServerConnectListener
interfacepublic final void removeServerConnectListener(ServerConnectListener l)
public final void addServerDisconnectListener(ServerDisconnectListener l)
There is no limit on the number of serverDisconnect handlers that can be registered for a particular Manager.
l
- An implemetation of the ServerDisconnectListener
interfacepublic final void removeServerDisconnectListener(ServerDisconnectListener l)
public java.lang.String toString()
public java.util.Vector getPhidgets()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |