Save This Page
Home » jboss-5.0.0.CR1-src » org » jboss » invocation » [javadoc | source]
org.jboss.invocation
public class: InvokerInterceptor [javadoc | source]
java.lang.Object
   org.jboss.proxy.Interceptor
      org.jboss.invocation.InvokerInterceptor

All Implemented Interfaces:
    Externalizable

Direct Known Subclasses:
    ByValueInvokerInterceptor, MarshallingInvokerInterceptor

A very simple implementation of it that branches to the local stuff.
Field Summary
protected  Invoker remoteInvoker    Invoker to the remote JMX node. 
protected static  Invoker localInvoker    Static references to local invokers. 
protected static  Class invokerProxyHA    The InvokerProxyHA class 
Fields inherited from org.jboss.proxy.Interceptor:
nextInterceptor
Constructor:
 public InvokerInterceptor() 
Method from org.jboss.invocation.InvokerInterceptor Summary:
getLocal,   hasLocalTarget,   invoke,   invokeInvoker,   invokeLocal,   invokeMarshalled,   isClustered,   isLocal,   isLocal,   readExternal,   setLocal,   writeExternal
Methods from org.jboss.proxy.Interceptor:
getNext,   invoke,   readExternal,   setNext,   writeExternal
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.invocation.InvokerInterceptor Detail:
 public static Invoker getLocal() 
    Get the local invoker reference, useful for optimization.
 public boolean hasLocalTarget(Invocation invocation) 
    Whether there is a local target
 public Object invoke(Invocation invocation) throws Exception 
    The invocation on the delegate, calls the right invoker. Remote if we are remote, local if we are local.
 protected Object invokeInvoker(Invocation invocation) throws Exception 
    Invoke using invoker
 protected Object invokeLocal(Invocation invocation) throws Exception 
    Invoke using local invoker
 protected Object invokeMarshalled(Invocation invocation) throws Exception 
    Invoke using local invoker and marshalled
 public boolean isClustered(Invocation invocation) 
    Whether we are in a clustered environment

    NOTE: This should be future compatible under any new design where a prior target chooser interceptor picks a non HA target than that code being inside a ha invoker.

 public boolean isLocal() 
    Returns wether we are local to the originating container or not.
 public boolean isLocal(Invocation invocation) 
    Whether the target is local
 public  void readExternal(ObjectInput in) throws ClassNotFoundException, IOException 
    Un-externalize this instance.

    We check timestamps of the interfaces to see if the instance is in the original VM of creation

 public static  void setLocal(Invoker invoker) 
    Set the local invoker reference, useful for optimization.
 public  void writeExternal(ObjectOutput out) throws 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.