|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sentilla.host.client.application.ApplicationServiceImpl
public class ApplicationServiceImpl
ApplicationServiceImpl is the internal implementation of the client API for application management with host servers.
Field Summary | |
---|---|
private HostClientService |
client
|
Constructor Summary | |
---|---|
ApplicationServiceImpl(HostClientService client)
|
Method Summary | |
---|---|
boolean |
deregister(int appId)
Deregisters the application given by appId from the server. |
JarFile |
get(int appId)
Returns the jar file corresponding to the given appId |
Application |
getApplication(int appId)
Returns the Application object corresponding to the given appId |
boolean |
install(Application app)
Installs the application given by the specified Application object to any mote networks accessible through the connected server. |
Collection<Integer> |
list()
Returns the list of applications installed in the connected mote networks as a Collection of integer application IDs. |
Collection<Integer> |
listRegistered()
Returns the list of applications registered with the connected server as a Collection of integer application IDs. |
private Object |
processMessage(HostMessage msg)
Method which handles actual message communication with the hostserver. |
int |
register(Application jarFile)
Registers an application jar file with the server. |
boolean |
run(int appId)
Installs the application given by appId to any mote networks accessible through the connected server. |
boolean |
stop(int appId)
Uninstall the application given by appId from any networks accessible from the connected hostserver. |
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 ApplicationServiceImpl(HostClientService client)
Method Detail |
---|
private Object processMessage(HostMessage msg) throws IOException
msg
- the message object to send to the server.
IOException
- throws IOException on communication errorspublic int register(Application jarFile) throws IOException
register
in interface ApplicationService
IOException
public boolean deregister(int appId) throws IOException
deregister
in interface ApplicationService
appId
- the ID of the application to be dregistered.
IOException
public Collection<Integer> listRegistered() throws IOException
listRegistered
in interface ApplicationService
IOException
public boolean run(int appId) throws IOException
run
in interface ApplicationService
appId
- the ID of the application to install
IOException
ApplicationException
public boolean install(Application app) throws IOException
app
- the Application object to be installed
IOException
public boolean stop(int appId) throws IOException
stop
in interface ApplicationService
appId
- the application ID of the app to be uninstalled.
IOException
ApplicationException
public Collection<Integer> list() throws IOException
list
in interface ApplicationService
IOException
public Application getApplication(int appId) throws IOException
getApplication
in interface ApplicationService
appId
- the application ID of the application to be fetched
IOException
public JarFile get(int appId) throws IOException
get
in interface ApplicationService
appId
- the application ID of the application jar to be fetched
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |