JBoss EJB client 1.0.11.Final-redhat-1

org.jboss.ejb.client
Class PropertiesBasedEJBClientConfiguration

java.lang.Object
  extended by org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration
All Implemented Interfaces:
EJBClientConfiguration

public class PropertiesBasedEJBClientConfiguration
extends Object
implements EJBClientConfiguration

A EJBClientConfiguration which is configured through Properties. Some well known properties will be looked for in the Properties that is passed to the constructor, for setting up the configurations

Author:
Jaikiran Pai

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.ejb.client.EJBClientConfiguration
EJBClientConfiguration.ClusterConfiguration, EJBClientConfiguration.ClusterNodeConfiguration, EJBClientConfiguration.CommonConnectionCreationConfiguration, EJBClientConfiguration.RemotingConnectionConfiguration
 
Constructor Summary
PropertiesBasedEJBClientConfiguration(Properties properties)
           
 
Method Summary
 CallbackHandler getCallbackHandler()
          Returns the default CallbackHandler that will be used while creating remoting connections.
 EJBClientConfiguration.ClusterConfiguration getClusterConfiguration(String clusterName)
          Returns a cluster configuration corresponding to the passed clusterName.
 Iterator<EJBClientConfiguration.ClusterConfiguration> getClusterConfigurations()
          Returns the cluster configurations.
 Iterator<EJBClientConfiguration.RemotingConnectionConfiguration> getConnectionConfigurations()
          Returns the connection configurations.
 DeploymentNodeSelector getDeploymentNodeSelector()
          Returns the DeploymentNodeSelector to be used for the EJBClientContext created out of this EJBClientConfiguration.
 org.xnio.OptionMap getEndpointCreationOptions()
          Returns the endpoint creation options that will be used for creating the remoting endpoint.
 String getEndpointName()
          Returns the endpoint name to be used for creating the remoting endpoint.
 long getInvocationTimeout()
          Returns the timeout, in milliseconds, that will be used for EJB invocations.
 long getReconnectTasksTimeout()
          Returns the wait timeout, in milliseconds, that will be used when the reconnect tasks are submitted.
 org.xnio.OptionMap getRemoteConnectionProviderCreationOptions()
          Returns the options that will be used for creating a remote connection provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesBasedEJBClientConfiguration

public PropertiesBasedEJBClientConfiguration(Properties properties)
Method Detail

getEndpointName

public String getEndpointName()
Description copied from interface: EJBClientConfiguration
Returns the endpoint name to be used for creating the remoting endpoint. This method must not return null

Specified by:
getEndpointName in interface EJBClientConfiguration
Returns:

getEndpointCreationOptions

public org.xnio.OptionMap getEndpointCreationOptions()
Description copied from interface: EJBClientConfiguration
Returns the endpoint creation options that will be used for creating the remoting endpoint. This method must not return null.

Specified by:
getEndpointCreationOptions in interface EJBClientConfiguration
Returns:

getRemoteConnectionProviderCreationOptions

public org.xnio.OptionMap getRemoteConnectionProviderCreationOptions()
Description copied from interface: EJBClientConfiguration
Returns the options that will be used for creating a remote connection provider. This method must not return null.

Specified by:
getRemoteConnectionProviderCreationOptions in interface EJBClientConfiguration
Returns:

getCallbackHandler

public CallbackHandler getCallbackHandler()
Description copied from interface: EJBClientConfiguration
Returns the default CallbackHandler that will be used while creating remoting connections. Individual connection configurations, cluster configurations, cluster node configurations can override the CallbackHandler to be used while creating the connections

This method must not return null.

Specified by:
getCallbackHandler in interface EJBClientConfiguration
Returns:

getConnectionConfigurations

public Iterator<EJBClientConfiguration.RemotingConnectionConfiguration> getConnectionConfigurations()
Description copied from interface: EJBClientConfiguration
Returns the connection configurations. If there are no such configurations, then this method will return an empty Iterator

Specified by:
getConnectionConfigurations in interface EJBClientConfiguration
Returns:

getClusterConfigurations

public Iterator<EJBClientConfiguration.ClusterConfiguration> getClusterConfigurations()
Description copied from interface: EJBClientConfiguration
Returns the cluster configurations. If there are no such configurations, then this method will return an empty Iterator

Specified by:
getClusterConfigurations in interface EJBClientConfiguration
Returns:

getClusterConfiguration

public EJBClientConfiguration.ClusterConfiguration getClusterConfiguration(String clusterName)
Description copied from interface: EJBClientConfiguration
Returns a cluster configuration corresponding to the passed clusterName. Returns null if no such cluster configuration exists.

Specified by:
getClusterConfiguration in interface EJBClientConfiguration
Parameters:
clusterName - The name of the cluster
Returns:

getInvocationTimeout

public long getInvocationTimeout()
Description copied from interface: EJBClientConfiguration
Returns the timeout, in milliseconds, that will be used for EJB invocations. A value of zero or a negative value will imply a "wait forever" semantic where the invocation will never timeout and the client will wait for the invocation result indefinitely.

Specified by:
getInvocationTimeout in interface EJBClientConfiguration
Returns:

getReconnectTasksTimeout

public long getReconnectTasksTimeout()
Description copied from interface: EJBClientConfiguration
Returns the wait timeout, in milliseconds, that will be used when the reconnect tasks are submitted. The reconnect tasks are submitted in parallel and hence the value returned by this method need not be the sum of time each reconnect task takes. The EJB client context will wait for a maximum of this amount of time in milliseconds, before giving up on the reconnect attempt. If all reconnect tasks finish before this timeout, then the EJB client context doesn't wait for any longer.

If this method returns zero or a negative value, then a default of 10 second timeout will be used.

Specified by:
getReconnectTasksTimeout in interface EJBClientConfiguration
Returns:

getDeploymentNodeSelector

public DeploymentNodeSelector getDeploymentNodeSelector()
Description copied from interface: EJBClientConfiguration
Returns the DeploymentNodeSelector to be used for the EJBClientContext created out of this EJBClientConfiguration. If this method returns null, then it's upto the implementation to use some default DeploymentNodeSelector

Specified by:
getDeploymentNodeSelector in interface EJBClientConfiguration
Returns:

JBoss EJB client 1.0.11.Final-redhat-1

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.