org.jboss.remoting.transport.local
Class LocalClientInvoker

java.lang.Object
  extended byorg.jboss.remoting.AbstractInvoker (src) 
      extended byorg.jboss.remoting.transport.local.LocalClientInvoker
All Implemented Interfaces:
ClientInvoker (src) , Invoker (src)

public class LocalClientInvoker
extends AbstractInvoker (src)
implements ClientInvoker (src)

LocalClientInvoker does not use any transport protocol for invoking the ServerInvoker, instead will make call directly on it locally. This increases performance since no serialization required as well as needed for push callbacks where InvokerCallbackHandler is in same JVM as the callback server.


Field Summary
 
Fields inherited from class org.jboss.remoting.AbstractInvoker (src)
classbyteloader, localServerLocator, locator, log
 
Constructor Summary
LocalClientInvoker(InvokerLocator (src)  locator)
           
 
Method Summary
 void connect()
          connect to the remote invoker
 void disconnect()
          disconnect from the remote invoker.
 Marshaller (src) getMarshaller()
           
 UnMarshaller (src) getUnMarshaller()
           
 java.lang.Object invoke(InvocationRequest (src)  invocation)
          transport a request against a remote ServerInvoker
 boolean isConnected()
          subclasses must provide this method to return true if their remote connection is connected and false if disconnected.
 void setMarshaller(Marshaller (src)  marshaller)
           
 void setServerInvoker(ServerInvoker (src)  svrInvoker)
          This will set the local reference to the server invoker.
 void setUnMarshaller(UnMarshaller (src)  unmarshaller)
           
 
Methods inherited from class org.jboss.remoting.AbstractInvoker (src)
getClassLoader, getClientLocator, getLocator, setClassLoader, setClientLocator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.remoting.transport.ClientInvoker (src)
getClientLocator, setClientLocator
 
Methods inherited from interface org.jboss.remoting.Invoker (src)
getLocator
 

Constructor Detail

LocalClientInvoker

public LocalClientInvoker(InvokerLocator (src)  locator)
Method Detail

invoke

public java.lang.Object invoke(InvocationRequest (src)  invocation)
                        throws java.lang.Throwable
transport a request against a remote ServerInvoker

Specified by:
invoke in interface ClientInvoker (src)
Parameters:
invocation -
Returns:
Throws:
java.lang.Throwable

isConnected

public boolean isConnected()
subclasses must provide this method to return true if their remote connection is connected and false if disconnected. in some transports, such as SOAP, this method may always return true, since the remote connectivity is done on demand and not kept persistent like other transports (such as socket-based transport).

Specified by:
isConnected in interface ClientInvoker (src)
Returns:
boolean true if connected, false if not

connect

public void connect()
             throws ConnectionFailedException (src) 
connect to the remote invoker

Specified by:
connect in interface ClientInvoker (src)
Throws:
ConnectionFailedException (src)

disconnect

public void disconnect()
disconnect from the remote invoker. Once disconnect called will not be able to re-connect by calling connect since will loose reference to server invoker.

Specified by:
disconnect in interface ClientInvoker (src)

setMarshaller

public void setMarshaller(Marshaller (src)  marshaller)
Specified by:
setMarshaller in interface ClientInvoker (src)

getMarshaller

public Marshaller (src)  getMarshaller()
Specified by:
getMarshaller in interface ClientInvoker (src)

setUnMarshaller

public void setUnMarshaller(UnMarshaller (src)  unmarshaller)
Specified by:
setUnMarshaller in interface ClientInvoker (src)

getUnMarshaller

public UnMarshaller (src)  getUnMarshaller()
Specified by:
getUnMarshaller in interface ClientInvoker (src)

setServerInvoker

public void setServerInvoker(ServerInvoker (src)  svrInvoker)
This will set the local reference to the server invoker. This is needed to so can make calls directly against server.

Parameters:
svrInvoker -