org.jboss.invocation.unified.interfaces
Class UnifiedInvokerHAProxy

java.lang.Object
  extended by org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy
      extended by org.jboss.invocation.unified.interfaces.UnifiedInvokerHAProxy
All Implemented Interfaces:
Externalizable, Serializable, Remote, Invoker, InvokerProxyHA

public class UnifiedInvokerHAProxy
extends UnifiedInvokerProxy
implements InvokerProxyHA

Unified invoker implementation for InvokerProxyHA

Author:
Tom Elrod, Galder Zamarreno
See Also:
Serialized Form

Field Summary
static Map txFailoverAuthorizations
           
 
Fields inherited from class org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy
log
 
Fields inherited from interface org.jboss.invocation.Invoker
ID
 
Constructor Summary
UnifiedInvokerHAProxy()
           
UnifiedInvokerHAProxy(org.jboss.remoting.InvokerLocator locator, boolean isStrictRMIException, List targets, LoadBalancePolicy policy, String proxyFamilyName, long viewId)
           
 
Method Summary
 void forbidTransactionFailover(Object tpc)
           
protected  org.jboss.remoting.Client getClient(Invocation invocationBasedRouting)
          Gets the remoting client to call on which is selected by the load balancing policy.
 org.jboss.ha.framework.interfaces.FamilyClusterInfo getFamilyClusterInfo()
           
 String getProxyFamilyName()
           
protected  Object getTransactionPropagationContext()
          Before invocation, access to transaction propagation context is needed to find out whether the invocation is part of an on going transaction and might need it's target being sticky to this tx.
 void invocationHasReachedAServer(Invocation invocation)
           
 Object invoke(Invocation invocation)
           
 void readExternal(ObjectInput in)
          Un-externalize this instance.
protected  void resetView()
           
protected  int totalNumberOfTargets()
           
 boolean txContextAllowsFailover(Invocation invocation)
           
 void updateClusterInfo(ArrayList newReplicants, long currentViewId)
           
 void writeExternal(ObjectOutput out)
          Externalize this instance and handle obtaining the remoteInvoker stub
 
Methods inherited from class org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy
createClient, getClient, getLocator, getServerHostName, getSubSystem, init, isStrictRMIException, setLocator, setStrictRMIException, setSubSystem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

txFailoverAuthorizations

public static final Map txFailoverAuthorizations
Constructor Detail

UnifiedInvokerHAProxy

public UnifiedInvokerHAProxy()

UnifiedInvokerHAProxy

public UnifiedInvokerHAProxy(org.jboss.remoting.InvokerLocator locator,
                             boolean isStrictRMIException,
                             List targets,
                             LoadBalancePolicy policy,
                             String proxyFamilyName,
                             long viewId)
Method Detail

txContextAllowsFailover

public boolean txContextAllowsFailover(Invocation invocation)

invocationHasReachedAServer

public void invocationHasReachedAServer(Invocation invocation)

getProxyFamilyName

public String getProxyFamilyName()

totalNumberOfTargets

protected int totalNumberOfTargets()

resetView

protected void resetView()

getClient

protected org.jboss.remoting.Client getClient(Invocation invocationBasedRouting)
                                       throws MalformedURLException
Gets the remoting client to call on which is selected by the load balancing policy. If the target InvokerLocator selected is not for the current remoting client, a new one will be initialized.

Parameters:
invocationBasedRouting -
Returns:
remoting client
Throws:
MalformedURLException

invoke

public Object invoke(Invocation invocation)
              throws Exception
Specified by:
invoke in interface Invoker
Overrides:
invoke in class UnifiedInvokerProxy
Parameters:
invocation - A pointer to the invocation object
Returns:
Return value of method invocation.
Throws:
Exception - Failed to invoke method.

updateClusterInfo

public void updateClusterInfo(ArrayList newReplicants,
                              long currentViewId)
Specified by:
updateClusterInfo in interface InvokerProxyHA

getFamilyClusterInfo

public org.jboss.ha.framework.interfaces.FamilyClusterInfo getFamilyClusterInfo()
Specified by:
getFamilyClusterInfo in interface InvokerProxyHA

forbidTransactionFailover

public void forbidTransactionFailover(Object tpc)
Specified by:
forbidTransactionFailover in interface InvokerProxyHA

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Externalize this instance and handle obtaining the remoteInvoker stub

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class UnifiedInvokerProxy
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Un-externalize this instance.

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class UnifiedInvokerProxy
Throws:
IOException
ClassNotFoundException

getTransactionPropagationContext

protected Object getTransactionPropagationContext()
Before invocation, access to transaction propagation context is needed to find out whether the invocation is part of an on going transaction and might need it's target being sticky to this tx.



Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.