com.sentilla.host.client.interfaces
Interface ApplicationService

All Known Implementing Classes:
ApplicationServiceImpl

public interface ApplicationService

ApplicationService provides a framework of methods for managing mote applications.

Author:
spence@sentilla.com

Method Summary
 boolean deregister(int appId)
          Deregister an Application with the server.
 JarFile get(int appId)
          Receive the jar file for the given application ID.
 Application getApplication(int appId)
          Receive an Application object from the server
 Collection<Integer> list()
          Receive a collection of the Application objects currently running in the network.
 Collection<Integer> listRegistered()
          Receive a list of mote applications registered with the server
 int register(Application jarFile)
          Register an Application with the server
 boolean run(int appId)
          Instruct the server to run the specified Application in the network.
 boolean stop(int appId)
          Instruct the server to terminate the specified Application from running in the network.
 

Method Detail

register

int register(Application jarFile)
             throws IOException
Register an Application with the server

Parameters:
jarFile -
Throws:
IOException

deregister

boolean deregister(int appId)
                   throws IOException
Deregister an Application with the server. This call will permanently remove the application from the host server. If the application is currently running in the network, this call will fail.

Parameters:
appId -
Returns:
boolean returns true on success
Throws:
IOException

listRegistered

Collection<Integer> listRegistered()
                                   throws IOException
Receive a list of mote applications registered with the server

Returns:
a collection of Application objects
Throws:
IOException

getApplication

Application getApplication(int appId)
                           throws IOException
Receive an Application object from the server

Parameters:
appId - of the requeested Application
Returns:
the Application object
Throws:
IOException

run

boolean run(int appId)
            throws ApplicationException,
                   IOException
Instruct the server to run the specified Application in the network. The Application must already be registed with the server.

Parameters:
appId - of the Application to be run in the network
Throws:
ApplicationException
IOException

stop

boolean stop(int appId)
             throws ApplicationException,
                    IOException
Instruct the server to terminate the specified Application from running in the network.

Parameters:
appId - of the Application to stop
Throws:
ApplicationException
IOException

list

Collection<Integer> list()
                         throws IOException
Receive a collection of the Application objects currently running in the network.

Returns:
the collection of currently running Application objects
Throws:
IOException

get

JarFile get(int appId)
            throws IOException
Receive the jar file for the given application ID.

Parameters:
appId - of the requested Application
Returns:
the application jar file
Throws:
IOException


Copyright © 2007 Sentilla, Inc. All Rights Reserved.