org.ow2.cmi.info
Class ClusteredObjectInfo

java.lang.Object
  extended by org.ow2.cmi.info.ClusteredObjectInfo

@NotThreadSafe
public final class ClusteredObjectInfo
extends java.lang.Object

Contain informations on a clustered object.

Author:
The new CMI team
See Also:
which creates instances of this

Constructor Summary
ClusteredObjectInfo(java.lang.Class<?> itfClass, java.lang.Class<? extends javax.ejb.EJBObject> businessClass, java.lang.String clusterName, boolean proxyEnabled, org.ow2.util.pool.api.IPoolConfiguration poolConfiguration, java.lang.Class<? extends IPolicy<?>> policyType, java.lang.Class<? extends IStrategy<?>> strategyType, java.util.Map<java.lang.String,java.lang.Object> properties, boolean stateful, boolean replicated, java.util.Set<java.lang.String> applicationExceptionNames)
          Constructs informations for a clustered object with the default strategy for the given LB policy.
ClusteredObjectInfo(java.lang.Class<?> itfClass, java.lang.String clusterName)
          Construct informations for a very basic clustered object.
 
Method Summary
 boolean equals(java.lang.Object object)
           
 java.util.Set<java.lang.String> getApplicationExceptionNames()
           
 java.lang.Class<? extends javax.ejb.EJBObject> getBusinessClass()
           
 java.lang.String getClusterName()
           
 java.lang.Class<?> getItfClass()
           
 java.lang.Class<? extends IPolicy<?>> getPolicyType()
           
 org.ow2.util.pool.api.IPoolConfiguration getPoolConfiguration()
           
 java.util.Map<java.lang.String,java.lang.Object> getProperties()
           
 java.lang.Class<? extends IStrategy<?>> getStrategyType()
           
 int hashCode()
           
 boolean hasState()
          Return true if this object has a state
 boolean isProxyEnabled()
           
 boolean isReplicated()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClusteredObjectInfo

public ClusteredObjectInfo(java.lang.Class<?> itfClass,
                           java.lang.Class<? extends javax.ejb.EJBObject> businessClass,
                           java.lang.String clusterName,
                           boolean proxyEnabled,
                           org.ow2.util.pool.api.IPoolConfiguration poolConfiguration,
                           java.lang.Class<? extends IPolicy<?>> policyType,
                           java.lang.Class<? extends IStrategy<?>> strategyType,
                           java.util.Map<java.lang.String,java.lang.Object> properties,
                           boolean stateful,
                           boolean replicated,
                           java.util.Set<java.lang.String> applicationExceptionNames)
Constructs informations for a clustered object with the default strategy for the given LB policy.

Parameters:
itfClass - interface implemented by the object
businessClass - Business interface (only for ejb2)
clusterName - a name of cluster
proxyEnabled - true if a CMI proxy should be used to make invocations
poolConfiguration - configuration for the pool of CMIReferenceable
policyType - a type of policy for load-balancing
strategyType - a type of strategy for load-balancing
properties - properties of the policy
stateful - true if this object has a state
replicated - true if the state of this object is replicated for high-availability
applicationExceptionNames - classnames of the application exceptions

ClusteredObjectInfo

public ClusteredObjectInfo(java.lang.Class<?> itfClass,
                           java.lang.String clusterName)
Construct informations for a very basic clustered object. A such object will be only added in the global registry, but CMI proxy will not be used.

Parameters:
itfClass - interface implemented by the object
clusterName - a name of cluster
Method Detail

getClusterName

public java.lang.String getClusterName()
Returns:
a name of the cluster where is deployed this object

isProxyEnabled

public boolean isProxyEnabled()
Returns:
if a CMI proxy should be used to make invocations

getItfClass

public java.lang.Class<?> getItfClass()
Returns:
Name of the interface that the object implements.

getPolicyType

public java.lang.Class<? extends IPolicy<?>> getPolicyType()
Returns:
the lbPolicyType

getStrategyType

public java.lang.Class<? extends IStrategy<?>> getStrategyType()
Returns:
the lbStrategyType

getBusinessClass

public java.lang.Class<? extends javax.ejb.EJBObject> getBusinessClass()
Returns:
the businessName

getProperties

public java.util.Map<java.lang.String,java.lang.Object> getProperties()
Returns:
the lbProperties

getPoolConfiguration

public org.ow2.util.pool.api.IPoolConfiguration getPoolConfiguration()
Returns:
the configuration for the pool of CMIReferenceable

hasState

public boolean hasState()
Return true if this object has a state


isReplicated

public boolean isReplicated()
Returns:
true if the state of this object is replicated for high-availability

getApplicationExceptionNames

public java.util.Set<java.lang.String> getApplicationExceptionNames()
Returns:
classnames of the application exceptions

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2009 OW2 Consortium. All Rights Reserved.