org.jboss.invocation.unified.interfaces
Class UnifiedInvokerHAProxy
java.lang.Object
org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy
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
Fields inherited from interface org.jboss.invocation.Invoker |
ID |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
txFailoverAuthorizations
public static final Map txFailoverAuthorizations
UnifiedInvokerHAProxy
public UnifiedInvokerHAProxy()
UnifiedInvokerHAProxy
public UnifiedInvokerHAProxy(org.jboss.remoting.InvokerLocator locator,
boolean isStrictRMIException,
List targets,
LoadBalancePolicy policy,
String proxyFamilyName,
long viewId)
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.