当前页面:
在线文档首页 >
JBoss 4.0.1 sp1 cluster API Documentation 英文版文档
HttpInvokerProxyHA (JBoss Cluster API) - JBoss 4.0.1 sp1 cluster API Documentation 英文版文档
org.jboss.invocation.http.interfaces
Class HttpInvokerProxyHA
java.lang.Object
org.jboss.invocation.http.interfaces.HttpInvokerProxyHA
- All Implemented Interfaces:
- Externalizable, org.jboss.invocation.Invoker, InvokerProxyHA, Remote, Serializable
- public class HttpInvokerProxyHA
- extends Object
- implements InvokerProxyHA, org.jboss.invocation.Invoker, Externalizable
The client side Http invoker proxy that posts an invocation to the
InvokerServlet using the HttpURLConnection created from a target url.
This proxy handles failover using its associated LoadBalancePolicy and
current list of URL strings. The candidate URLs are updated dynamically
after an invocation if the cluster partitation view has changed.
- Version:
- $Revision: 1.2 $
- Author:
- Scott.Stark@jboss.org
- 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 |
loadBalancePolicy
protected LoadBalancePolicy loadBalancePolicy
proxyFamilyName
protected String proxyFamilyName
familyClusterInfo
protected FamilyClusterInfo familyClusterInfo
trace
protected transient boolean trace
- Trace level logging flag only set when the proxy is created or read from JNDI
HttpInvokerProxyHA
public HttpInvokerProxyHA()
HttpInvokerProxyHA
public HttpInvokerProxyHA(ArrayList targets,
long viewId,
LoadBalancePolicy policy,
String proxyFamilyName)
- Parameters:
targets
- the list of URLs through which clients should contact the
InvokerServlet.policy
- the policy for choosing among targets ClusteringTargetsRepository under
which this proxy is to be storedproxyFamilyName
- the name into the
updateClusterInfo
public void updateClusterInfo(ArrayList targets,
long viewId)
- Specified by:
updateClusterInfo
in interface InvokerProxyHA
getServerHostName
public String getServerHostName()
throws Exception
- Specified by:
getServerHostName
in interface org.jboss.invocation.Invoker
- Throws:
Exception
getClusterInfo
public FamilyClusterInfo getClusterInfo()
getRemoteTarget
public Object getRemoteTarget()
getRemoteTarget
public Object getRemoteTarget(org.jboss.invocation.Invocation invocationBasedRouting)
remoteTargetHasFailed
public void remoteTargetHasFailed(Object target)
totalNumberOfTargets
protected int totalNumberOfTargets()
removeDeadTarget
protected void removeDeadTarget(Object target)
resetView
protected void resetView()
invoke
public Object invoke(org.jboss.invocation.Invocation invocation)
throws Exception
- This method builds a MarshalledInvocation from the invocation passed
in and then does a post to the target URL.
- Specified by:
invoke
in interface org.jboss.invocation.Invoker
- Throws:
Exception
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
- Externalize this instance.
- Specified by:
writeExternal
in interface Externalizable
- Throws:
IOException
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
- Un-externalize this instance.
- Specified by:
readExternal
in interface Externalizable
- Throws:
IOException
ClassNotFoundException
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.