org.jboss.invocation.http.interfaces
Class HttpInvokerProxy

java.lang.Object
  extended by org.jboss.invocation.http.interfaces.HttpInvokerProxy
All Implemented Interfaces:
Externalizable, Serializable, Remote, Invoker

public class HttpInvokerProxy
extends Object
implements Invoker, Externalizable

The client side Http invoker proxy that posts an invocation to the InvokerServlet using the HttpURLConnection created from the proxy externalURL.

Version:
$Revision: 57209 $
Author:
Scott.Stark@jboss.org
See Also:
Serialized Form

Field Summary
protected  URL externalURL
           
protected  String externalURLValue
           
 
Fields inherited from interface org.jboss.invocation.Invoker
ID
 
Constructor Summary
HttpInvokerProxy()
           
HttpInvokerProxy(String externalURLValue)
           
 
Method Summary
 URL getExternalURL()
           
 String getExternalURLValue()
           
 String getServerHostName()
          A free form String identifier for this delegate invoker, can be clustered or target node This should evolve in a more advanced meta-inf object
 Object invoke(Invocation invocation)
          This method builds a MarshalledInvocation from the invocation passed in and then does a post to the target URL.
 void readExternal(ObjectInput in)
          Un-externalize this instance.
 String toString()
           
 void writeExternal(ObjectOutput out)
          Externalize this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

externalURLValue

protected String externalURLValue

externalURL

protected transient URL externalURL
Constructor Detail

HttpInvokerProxy

public HttpInvokerProxy()

HttpInvokerProxy

public HttpInvokerProxy(String externalURLValue)
Parameters:
externalURL, - the URL through which clients should contact the InvokerServlet.
Method Detail

getServerHostName

public String getServerHostName()
                         throws Exception
Description copied from interface: Invoker
A free form String identifier for this delegate invoker, can be clustered or target node This should evolve in a more advanced meta-inf object

Specified by:
getServerHostName in interface Invoker
Throws:
Exception

getExternalURLValue

public String getExternalURLValue()

getExternalURL

public URL getExternalURL()

toString

public String toString()
Overrides:
toString in class Object

invoke

public Object invoke(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 Invoker
Parameters:
invocation - A pointer to the invocation object
Returns:
Return value of method invocation.
Throws:
Exception - Failed to invoke method.

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.