|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sentilla.host.client.admin.ServerAdminClientImpl
public class ServerAdminClientImpl
ServerAdminService client side implementation using the mote protocol.
Field Summary | |
---|---|
private HostClientService |
client
|
Constructor Summary | |
---|---|
ServerAdminClientImpl(HostClientService client)
|
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. |
private ServerAdminMessage |
processMessage(HostMessage msg)
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private HostClientService client
Constructor Detail |
---|
public ServerAdminClientImpl(HostClientService client)
Method Detail |
---|
private ServerAdminMessage processMessage(HostMessage msg) throws ServiceException
ServiceException
public void connectGateway(String communicationPort) throws ServiceException
ServerAdminService
connectGateway
in interface ServerAdminService
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.public void disconnectGateway() throws ServiceException
ServerAdminService
disconnectGateway
in interface ServerAdminService
ServiceException
- if a transport or service related error occuredpublic void setDebug(int level) throws ServiceException
ServerAdminService
setDebug
in interface ServerAdminService
level
- to set debug to
ServiceException
- if a transport or service related error occuredpublic int getDebug() throws ServiceException
ServerAdminService
getDebug
in interface ServerAdminService
ServiceException
public String getDefaultBasestationComPort() throws ServiceException, IOException
ServerAdminService
getDefaultBasestationComPort
in interface ServerAdminService
ServiceException
IOException
public boolean isGatewayConnected() throws ServiceException
ServerAdminService
isGatewayConnected
in interface ServerAdminService
ServiceException
- if a transport or service related error occuredpublic Collection<String> listComPorts() throws ServiceException
ServerAdminService
listComPorts
in interface ServerAdminService
ServiceException
- if a transport or service related error occuredpublic GatewayNode getConnectedGateway() throws ServiceException
ServerAdminService
getConnectedGateway
in interface ServerAdminService
ServiceException
- if a transport or service related error occured
or if gateway is not connectedpublic void restartServer() throws ServiceException
ServerAdminService
restartServer
in interface ServerAdminService
ServiceException
public void startServer() throws ServiceException
ServerAdminService
startServer
in interface ServerAdminService
ServiceException
- if a transport or service related error occuredpublic void stopServer() throws ServiceException
ServerAdminService
stopServer
in interface ServerAdminService
ServiceException
- if a transport or service related error occured
or if service is already stopped.public Collection<NetworkNode> getNetwork() throws IOException
ServerAdminService
getNetwork
in interface ServerAdminService
IOException
public boolean setProperty(String name, Object value)
ServerAdminService
setProperty
in interface ServerAdminService
name
- a String property keyvalue
- an Object to associate with the given key
public Object getProperty(String name)
ServerAdminService
getProperty
in interface ServerAdminService
name
- the key of the property value to return.
public Application getSystemBinary()
ServerAdminService
getSystemBinary
in interface ServerAdminService
public Collection<GatewayNode> listComBaseStations() throws ServiceException
ServerAdminService
listComBaseStations
in interface ServerAdminService
ServiceException
- if a transport or service related error occuredpublic byte[] getClassBytes(String name)
ServerAdminService
getClassBytes
in interface ServerAdminService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |