org.jboss.invocation.jrmp.interfaces
Class JRMPInvokerProxyHA

java.lang.Object
  extended byorg.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy (src) 
      extended byorg.jboss.invocation.jrmp.interfaces.JRMPInvokerProxyHA
All Implemented Interfaces:
java.io.Externalizable, Invoker (src) , InvokerProxyHA (src) , java.rmi.Remote, java.io.Serializable

public class JRMPInvokerProxyHA
extends JRMPInvokerProxy (src)
implements InvokerProxyHA (src) , java.io.Externalizable

An extension of the JRMPInvokerProxy that supports failover and load balancing among a

See Also:
Serialized Form

Field Summary
protected  LoadBalancePolicy (src) loadBalancePolicy
           
protected  java.lang.String proxyFamilyName
           
protected  boolean trace
          Trace level logging flag only set when the proxy is created or read from JNDI
static java.util.WeakHashMap txFailoverAuthorizations
           
 
Fields inherited from class org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy (src)
MAX_RETRIES, remoteInvoker
 
Fields inherited from interface org.jboss.invocation.Invoker (src)
ID
 
Constructor Summary
JRMPInvokerProxyHA()
           
JRMPInvokerProxyHA(java.util.ArrayList targets, LoadBalancePolicy (src)  policy, java.lang.String proxyFamilyName, long viewId)
           
 
Method Summary
 java.lang.Object getRemoteTarget()
           
 java.lang.Object getRemoteTarget(Invocation (src)  invocationBasedRouting)
           
 void invocationHasReachedAServer(Invocation (src)  invocation)
           
 java.lang.Object invoke(Invocation (src)  invocation)
          The invocation on the delegate, calls the right invoker.
 void readExternal(java.io.ObjectInput in)
          Un-externalize this instance.
 void remoteTargetHasFailed(java.lang.Object target)
           
protected  void removeDeadTarget(java.lang.Object target)
           
protected  void resetView()
           
protected  int totalNumberOfTargets()
           
 boolean txContextAllowsFailover(Invocation (src)  invocation)
           
 void updateClusterInfo(java.util.ArrayList targets, long viewId)
           
 void writeExternal(java.io.ObjectOutput out)
          Externalize this instance.
 
Methods inherited from class org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy (src)
getServerHostName, getTransactionPropagationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

txFailoverAuthorizations

public static final java.util.WeakHashMap txFailoverAuthorizations

loadBalancePolicy

protected LoadBalancePolicy (src)  loadBalancePolicy

proxyFamilyName

protected java.lang.String proxyFamilyName

trace

protected transient boolean trace
Trace level logging flag only set when the proxy is created or read from JNDI

Constructor Detail

JRMPInvokerProxyHA

public JRMPInvokerProxyHA()

JRMPInvokerProxyHA

public JRMPInvokerProxyHA(java.util.ArrayList targets,
                          LoadBalancePolicy (src)  policy,
                          java.lang.String proxyFamilyName,
                          long viewId)
Method Detail

updateClusterInfo

public void updateClusterInfo(java.util.ArrayList targets,
                              long viewId)
Specified by:
updateClusterInfo in interface InvokerProxyHA (src)

getRemoteTarget

public java.lang.Object getRemoteTarget()

getRemoteTarget

public java.lang.Object getRemoteTarget(Invocation (src)  invocationBasedRouting)

remoteTargetHasFailed

public void remoteTargetHasFailed(java.lang.Object target)

removeDeadTarget

protected void removeDeadTarget(java.lang.Object target)

totalNumberOfTargets

protected int totalNumberOfTargets()

resetView

protected void resetView()

txContextAllowsFailover

public boolean txContextAllowsFailover(Invocation (src)  invocation)

invocationHasReachedAServer

public void invocationHasReachedAServer(Invocation (src)  invocation)

invoke

public java.lang.Object invoke(Invocation (src)  invocation)
                        throws java.lang.Exception
The invocation on the delegate, calls the right invoker. Remote if we are remote, local if we are local.

Specified by:
invoke in interface Invoker (src)
Overrides:
invoke in class JRMPInvokerProxy (src)
Throws:
java.lang.Exception

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Externalize this instance. If this instance lives in a different VM than its container invoker, the remote interface of the container invoker is not externalized.

Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class JRMPInvokerProxy (src)
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Un-externalize this instance. We check timestamps of the interfaces to see if the instance is in the original VM of creation

Specified by:
readExternal in interface java.io.Externalizable
Overrides:
readExternal in class JRMPInvokerProxy (src)
Throws:
java.io.IOException
java.lang.ClassNotFoundException