Container Deployment
From Jini.org
This page will be used to document some of the concrete thoughts and code associated with designing a container deployment strategy for Jini base service containers to use in conjunction with IDEs.
Contents |
Netbeans IDE
- Netbeans has a "lookup by interface" facility that would allow new instances of a deployment implementation interface to be discovered and made visible to the user.
Eclipse IDE
Other IDE Issues
- Enabling the use of Jeri/RMI by installing a SecurityManager in the IDE is probably not possible.
A Proposed Deployment Control Interface
public interface ServiceDeploymentControl {
/**
* Start a new instance of the container with the give name.
* @param name the name of the container instance.
*/
public Uuid deployInstance( String name );
/**
* Get the configuration for the indicated instance.
* @param uid the Uuid of a previously created instance
* as returned from {@link #deployInstance(String)}.
* @return a stream of configuration data appropriately
* formatted for the container.
*/
public InputStream getInstanceConfig( Uuid uid );
/**
* Set the configuration for the indicated instance
* @param uid the Uuid of a previously created instance
* as returned from {@link #deployInstance(String)}.
* @param list a stream of configuration data appropriately
* formatted for the container.
*/
public void setInstanceConfig( Uuid uid, InputStream list );
/**
* Get the container for the GUI that the user should
* use to configure the indicated container deployment.
* @param uid the Uuid of a previously created instance
* as returned from {@link #deployInstance(String)}.
* @param ctx a yet to be defined context that provides
* access back to the IDE GUI environment for dialogs
* and other things that the config environment might need.
*/
public Container getConfigUI( Uuid uid, DeploymentContext ctx );
/**
* Define a new Service in the given instance of the container.
* Only configuration is specified, because policy might be implicit,
* or already part of the container environment.
* @param uid the Uuid of a previously created instance
* as returned from {@link #deployInstance(String)}.
* @param classname the name of the class to launch as the service class.
* @param config the configuration for the service instance.
* @return the Uuid to associate with interacting with the created service
* instance.
*/
public Uuid defineService( Uuid uid, String classname, InputStream config );
/**
* Specify the policy for the indicated service instance. This stream
* will be specific to the container most likely. It might be
* grant statements in a normal policy file format, but it might also
* be a serialized set of permissions or something completely different.
* @param uid the Uuid of a previously created instance
* as returned from {@link #deployInstance(String)}.
*/
public void setPolicy( Uuid uid, InputStream policyText );
/**
* Sets the classpath contents using file names with appropriate
* structure references based on the container implementation.
* @param uid the Uuid of a previously created instance
* as returned from {@link #deployInstance(String)}.
*/
public void setClassPath( Uuid uid, String files[] );
/**
* Sets the codebase contents using file names with appropriate
* structure references based on the container implementation.
* @param uid the Uuid of a previously created instance
* as returned from {@link #deployInstance(String)}.
*/
public void setCodeBase( Uuid uid, String files[] );
/**
* Probably need explicit lifecycle management too.
*/
public void startService( Uuid uid );
public void stopService( Uuid uid );
public boolean queryService( Uuid uid );
public void addServiceStateListener( Uuid uid, ServiceStateListener lis );
}
