|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ServerAdminService
HostAdmin service allows to administer host server related properties and behavior as well as the behavior of its associated gateway.
A host may have one gateway associated with it. This gateway may be running on a local serial communication port or a remote TCP IP port (the default 9002). The communication port syntax is that of SF (serial forwarder), for example:
If the service is 'started' for the first time, it will start in a 'disconnected' state (no gateway is connected). Only after a first connect is issued, a subsequent stop/start will resust in a connected started server. ServiceException is used in all service invocations to handle error conditions.
Method Summary | |
---|---|
void |
connectGateway(String communicationPort)
Connects to the gateway previously set via setGateway call. |
void |
disconnectGateway()
Disconnects from gateway. |
byte[] |
getClassBytes(String name)
Get a class definition from the server. |
GatewayNode |
getConnectedGateway()
Returns the gateway communication port currently used by the host server. |
int |
getDebug()
Queries the host server about the current debug level. |
String |
getDefaultBasestationComPort()
Returns the default COM port of the gateway associated with this host. |
Collection<NetworkNode> |
getNetwork()
Returns of NetworkNode objects reflecting the current motes present in the network connected via the current basestation. |
Object |
getProperty(String name)
Get a property from the host server. |
Application |
getSystemBinary()
Get the yaml data for the system binary. |
boolean |
isGatewayConnected()
Returns the connected state of gateway |
Collection<GatewayNode> |
listComBaseStations()
Lists the serial COM ports with BaseStations connected. |
Collection<String> |
listComPorts()
Lists the serial COM ports available to be used/set. |
void |
restartServer()
Re-starts the server. |
void |
setDebug(int level)
Directs the host server to use the given level of debugging. |
boolean |
setProperty(String name,
Object value)
Set a property with the host server. |
void |
startServer()
Starts the server. |
void |
stopServer()
Stop the server, except for the listener service so that the client can follow up by "startServer" invocation. |
Method Detail |
---|
void setDebug(int level) throws ServiceException
level
- to set debug to
ServiceException
- if a transport or service related error occuredint getDebug() throws ServiceException
ServiceException
Collection<String> listComPorts() throws ServiceException
ServiceException
- if a transport or service related error occuredCollection<GatewayNode> listComBaseStations() throws ServiceException
ServiceException
- if a transport or service related error occuredString getDefaultBasestationComPort() throws ServiceException, IOException
ServiceException
IOException
GatewayNode getConnectedGateway() throws ServiceException
ServiceException
- if a transport or service related error occured
or if gateway is not connectedvoid disconnectGateway() throws ServiceException
ServiceException
- if a transport or service related error occuredvoid connectGateway(String communicationPort) throws ServiceException
communicationPort
- communication port using SF (serial forwarder) syntax such as:
ServiceException
- if a transport or service related error occured
or if gateway is already connected.boolean isGatewayConnected() throws ServiceException
ServiceException
- if a transport or service related error occuredvoid startServer() throws ServiceException
ServiceException
- if a transport or service related error occuredvoid stopServer() throws ServiceException
ServiceException
- if a transport or service related error occured
or if service is already stopped.void restartServer() throws ServiceException
ServiceException
Collection<NetworkNode> getNetwork() throws IOException
IOException
boolean setProperty(String name, Object value)
name
- a String property keyvalue
- an Object to associate with the given key
Object getProperty(String name)
name
- the key of the property value to return.
Application getSystemBinary()
byte[] getClassBytes(String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |