站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 cluster API Documentation 英文版文档

HARMIServerImpl (JBoss Cluster API) - JBoss 4.0.1 sp1 cluster API Documentation 英文版文档


org.jboss.ha.framework.server
Class HARMIServerImpl

java.lang.Object
  extended byorg.jboss.ha.framework.server.HARMIServerImpl
All Implemented Interfaces:
HARMIServer, Remote

public class HARMIServerImpl
extends Object
implements HARMIServer

This class is a server-side proxy for replicated RMI objects.

Version:
$Revision: 1.19 $
Author:
bill@jboss.org, sacha.labourey@jboss.org, Scott.Stark@jboss.org

Nested Class Summary
 class HARMIServerImpl.RefreshProxiesHATarget
           
 
Field Summary
protected  Object handler
           
protected  Class intf
           
protected  Map invokerMap
           
protected  String key
           
protected  org.jboss.logging.Logger log
           
protected  RemoteStub rmistub
           
protected  Object stub
           
protected  HARMIServerImpl.RefreshProxiesHATarget target
           
 
Fields inherited from interface org.jboss.ha.framework.interfaces.HARMIServer
rmiServers
 
Constructor Summary
HARMIServerImpl(HAPartition partition, String replicantName, Class intf, Object handler)
          Create a new HARMIServer implementation that will act as a RMI end-point for a specific server.
HARMIServerImpl(HAPartition partition, String replicantName, Class intf, Object handler, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
           
HARMIServerImpl(HAPartition partition, String replicantName, Class intf, Object handler, int port, RMIClientSocketFactory clientSocketFactory, RMIServerSocketFactory serverSocketFactory, InetAddress bindAddress)
           
 
Method Summary
 Object createHAStub(LoadBalancePolicy policy)
          Once a HARMIServer implementation exists, it is possible to ask for a stub that can, for example, be bound in JNDI for client use.
 void destroy()
           
 Object getLocal()
          Get local stub for this service.
 List getReplicants()
          Returns a list of node stubs that are current replica of this service.
 HARMIResponse invoke(long clientViewId, org.jboss.invocation.MarshalledInvocation mi)
          Performs an invocation through this HA-RMI for the target object hidden behind it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handler

protected Object handler

invokerMap

protected Map invokerMap

log

protected org.jboss.logging.Logger log

rmistub

protected RemoteStub rmistub

stub

protected Object stub

key

protected String key

intf

protected Class intf

target

protected HARMIServerImpl.RefreshProxiesHATarget target
Constructor Detail

HARMIServerImpl

public HARMIServerImpl(HAPartition partition,
                       String replicantName,
                       Class intf,
                       Object handler,
                       int port,
                       RMIClientSocketFactory csf,
                       RMIServerSocketFactory ssf)
                throws Exception

HARMIServerImpl

public HARMIServerImpl(HAPartition partition,
                       String replicantName,
                       Class intf,
                       Object handler,
                       int port,
                       RMIClientSocketFactory clientSocketFactory,
                       RMIServerSocketFactory serverSocketFactory,
                       InetAddress bindAddress)
                throws Exception

HARMIServerImpl

public HARMIServerImpl(HAPartition partition,
                       String replicantName,
                       Class intf,
                       Object handler)
                throws Exception
Create a new HARMIServer implementation that will act as a RMI end-point for a specific server.

Parameters:
partition - HAPartition that will determine the cluster member
replicantName - Name of the service using this HARMIServer
intf - Class type under which should appear the RMI server dynamically built
handler - Target object to which calls will be forwarded
Throws:
Exception - Thrown if any exception occurs during call forwarding
Method Detail

createHAStub

public Object createHAStub(LoadBalancePolicy policy)
Once a HARMIServer implementation exists, it is possible to ask for a stub that can, for example, be bound in JNDI for client use. Each client stub may incorpore a specific load-balancing policy.

Parameters:
policy - LoadBalancePolicy implementation to ues on the client.
Returns:

destroy

public void destroy()

invoke

public HARMIResponse invoke(long clientViewId,
                            org.jboss.invocation.MarshalledInvocation mi)
                     throws Exception
Description copied from interface: HARMIServer
Performs an invocation through this HA-RMI for the target object hidden behind it.

Specified by:
invoke in interface HARMIServer
Throws:
Exception

getReplicants

public List getReplicants()
                   throws Exception
Description copied from interface: HARMIServer
Returns a list of node stubs that are current replica of this service.

Specified by:
getReplicants in interface HARMIServer
Throws:
Exception

getLocal

public Object getLocal()
                throws Exception
Description copied from interface: HARMIServer
Get local stub for this service.

Specified by:
getLocal in interface HARMIServer
Throws:
Exception


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.