Fields Summary |
---|
protected RMIClientSocketFactory | clientSocketFactoryAn optional custom client socket factory |
protected RMIServerSocketFactory | serverSocketFactoryAn optional custom server socket factory |
protected String | clientSocketFactoryNameThe class name of the optional custom client socket factory |
protected String | serverSocketFactoryNameThe class name of the optional custom server socket factory |
protected String | loadBalancePolicyThe class name of the load balancing policy |
protected int | rmiPortThe RMI port on which the Naming implementation will be exported. The
default is 0 which means use any available port. |
org.jboss.ha.framework.server.HARMIServerImpl | rmiserver |
Methods Summary |
---|
public java.lang.String | getClientSocketFactory()
return serverSocketFactoryName;
|
public java.lang.String | getLoadBalancePolicy()
return loadBalancePolicy;
|
protected org.jnp.interfaces.Naming | getNamingProxy()
Class clazz;
LoadBalancePolicy policy;
rmiserver = new HARMIServerImpl(partition, "HAJNDI", Naming.class,
theServer, rmiPort, clientSocketFactory, serverSocketFactory, bindAddress);
ClassLoader cl = Thread.currentThread().getContextClassLoader();
clazz = cl.loadClass(loadBalancePolicy);
policy = (LoadBalancePolicy)clazz.newInstance();
Naming proxy = (Naming) rmiserver.createHAStub(policy);
return proxy;
|
public int | getRmiPort()
return rmiPort;
|
public java.lang.String | getServerSocketFactory()
return serverSocketFactoryName;
|
public void | setClientSocketFactory(java.lang.String factoryClassName)
this.clientSocketFactoryName = factoryClassName;
ClassLoader loader = Thread.currentThread().getContextClassLoader();
Class clazz = loader.loadClass(clientSocketFactoryName);
clientSocketFactory = (RMIClientSocketFactory) clazz.newInstance();
|
public void | setLoadBalancePolicy(java.lang.String policyClassName)
loadBalancePolicy = policyClassName;
|
public void | setRmiPort(int p)
rmiPort = p;
|
public void | setServerSocketFactory(java.lang.String factoryClassName)
this.serverSocketFactoryName = factoryClassName;
ClassLoader loader = Thread.currentThread().getContextClassLoader();
Class clazz = loader.loadClass(serverSocketFactoryName);
serverSocketFactory = (RMIServerSocketFactory) clazz.newInstance();
|
protected void | stopService()
super.stopService();
// Unexport server
log.debug("destroy ha rmiserver");
this.rmiserver.destroy ();
|