org.systinet.wasp.dd
Interface ServiceInstance

All Superinterfaces:
AttributablePart, ConfigurablePart, DeploymentPart, DocumentablePart, ExtensiblePart, ImplementablePart, NamedPart

public interface ServiceInstance
extends NamedPart, ImplementablePart, ConfigurablePart, ExtensiblePart, DocumentablePart, AttributablePart

This interface describes configuration of an instance of service.

Since:
4.0
Component:
Core

Field Summary
static int INSTANTIATION_PER_CLIENT
          One instance per client (i.e.
static int INSTANTIATION_SHARED
          One shared instance for all calls.
 
Method Summary
 int getInstantiationMethod()
          Gets the instantiation method used (see INSTANTIATION_XXX constants).
 java.lang.Integer getMaxInstances()
          Returns the maximum number of allocated instances of the service.
 java.lang.Integer getTTL()
          Returns time-to-live of an instance in seconds.
 boolean isPreload()
          Checks if the instance is instantiated during server startup.
 void setInstantiationMethod(int method)
          Sets up the instantiation method used.
 void setMaxInstances(java.lang.Integer maxInstances)
          Sets the maximum number of allocated instances of the service.
 void setPreload(boolean preload)
          Sets if the instance is instantiated during server startup.
 void setTTL(java.lang.Integer ttl)
          Sets time-to-live of an instance in second.
 
Methods inherited from interface org.systinet.wasp.dd.NamedPart
getName, setName
 
Methods inherited from interface org.systinet.wasp.dd.DeploymentPart
getDeploymentDescriptor
 
Methods inherited from interface org.systinet.wasp.dd.ImplementablePart
getImplementationClass, setImplementationClass
 
Methods inherited from interface org.systinet.wasp.dd.ConfigurablePart
getConfiguration
 
Methods inherited from interface org.systinet.wasp.dd.ExtensiblePart
addElement, getElements
 
Methods inherited from interface org.systinet.wasp.dd.DocumentablePart
getDocumentation, setDocumentation
 
Methods inherited from interface org.systinet.wasp.dd.AttributablePart
getAttributes, newAttributes, setAttributes
 

Field Detail

INSTANTIATION_SHARED

public static final int INSTANTIATION_SHARED
One shared instance for all calls.

See Also:
getInstantiationMethod(), setInstantiationMethod(int), Constant Field Values

INSTANTIATION_PER_CLIENT

public static final int INSTANTIATION_PER_CLIENT
One instance per client (i.e. stub).

See Also:
getInstantiationMethod(), setInstantiationMethod(int), Constant Field Values
Method Detail

getMaxInstances

public java.lang.Integer getMaxInstances()
Returns the maximum number of allocated instances of the service.

Returns:
maximum number of allocated instances of the service or null when not specified

setMaxInstances

public void setMaxInstances(java.lang.Integer maxInstances)
Sets the maximum number of allocated instances of the service.

Parameters:
maxInstances - maximum number of allocated instances of the service or null when not specified

isPreload

public boolean isPreload()
Checks if the instance is instantiated during server startup.

Returns:
true if the instance is instantiated during server startup

setPreload

public void setPreload(boolean preload)
Sets if the instance is instantiated during server startup.

Parameters:
preload - true if instance is instantiated during server startup

getTTL

public java.lang.Integer getTTL()
Returns time-to-live of an instance in seconds.

Returns:
TTL or null when not specified

setTTL

public void setTTL(java.lang.Integer ttl)
Sets time-to-live of an instance in second.

Parameters:
ttl - TTL or null when not specified

getInstantiationMethod

public int getInstantiationMethod()
Gets the instantiation method used (see INSTANTIATION_XXX constants).

Returns:
the instantiation method used
See Also:
INSTANTIATION_SHARED, INSTANTIATION_PER_CLIENT

setInstantiationMethod

public void setInstantiationMethod(int method)
Sets up the instantiation method used.

Parameters:
method - one of INSTANTIATION_XXX constants.
See Also:
INSTANTIATION_SHARED, INSTANTIATION_PER_CLIENT