org.idoox.wasp.server.adaptor
Interface InstanceCountLimitor


Deprecated. See the new Runtime Publishing API (ServiceInstance).

public interface InstanceCountLimitor

An implementation of this interface can be used to limit number of instances of the service that are present in the server at a time. An instance implementing this interface is present in the context data of org.idoox.wasp.server.WSContext under the key SERVICE_CONTEXT_KEY.

Since:
4.0
Component:
Core

Field Summary
static java.lang.String SERVICE_CONTEXT_KEY
          Deprecated. Under this key an instance of this interface is present in the context data of org.idoox.wasp.server.WSContext.
 
Method Summary
 boolean canCreateInstance()
          Deprecated. Finds out whether the current number of instances is above the limit.
 int getCurrentInstances()
          Deprecated. Gets the current number of instances.
 int getMaxInstances()
          Deprecated. Gets the current limit on the number of instances.
 void setMaxInstances(int max)
          Deprecated. Sets the maximum number of instances.
 

Field Detail

SERVICE_CONTEXT_KEY

public static final java.lang.String SERVICE_CONTEXT_KEY
Deprecated. 
Under this key an instance of this interface is present in the context data of org.idoox.wasp.server.WSContext.

See Also:
Constant Field Values
Method Detail

setMaxInstances

public void setMaxInstances(int max)
Deprecated. 
Sets the maximum number of instances.


getMaxInstances

public int getMaxInstances()
Deprecated. 
Gets the current limit on the number of instances.


getCurrentInstances

public int getCurrentInstances()
Deprecated. 
Gets the current number of instances. This may be actually larger than the limit because the limit is not enforced when using remote references.


canCreateInstance

public boolean canCreateInstance()
Deprecated. 
Finds out whether the current number of instances is above the limit.