Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.invocation
Class InvokerInterceptor

    java.lang.Object
      org.jboss.proxy.Interceptor
          org.jboss.invocation.InvokerInterceptor

All Implemented Interfaces:
  Externalizable, Serializable

Direct Known Subclasses:
  ByValueInvokerInterceptor, MarshallingInvokerInterceptor

public class InvokerInterceptor
extends Interceptor
implements Externalizable

A very simple implementation of it that branches to the local stuff.

Version:
  $Revision: 1.5.6.1 $
Author:
  Marc Fleury, Scott.Stark@jboss.org
See Also:
  Serialized Form

Field Summary
`protected static Invoker` | `localInvoker` Static references to local invokers.
`protected Invoker` | `remoteInvoker` Invoker to the remote JMX node.

Fields inherited from class org.jboss.proxy.Interceptor
`nextInterceptor`

Constructor Summary
`InvokerInterceptor()` Exposed for externalization.

Method Summary
`static Invoker` | `getLocal()` Get the local invoker reference, useful for optimization.
`Object` | `invoke(Invocation invocation)` The invocation on the delegate, calls the right invoker.
`protected Object` | `invokeInvoker(Invocation invocation)` Invoke using invoker
`protected Object` | `invokeLocal(Invocation invocation)` Invoke using local invoker
`protected Object` | `invokeMarshalled(Invocation invocation)` Invoke using local invoker and marshalled
`boolean` | `isLocal()` Returns wether we are local to the originating container or not.
`boolean` | `isLocal(Invocation invocation)` Whether the target is local
`void` | `readExternal(ObjectInput in)` Un-externalize this instance.
`static void` | `setLocal(Invoker invoker)` Set the local invoker reference, useful for optimization.
`void` | `writeExternal(ObjectOutput out)` Externalize this instance.

Methods inherited from class org.jboss.proxy.Interceptor
`getNext, setNext`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### remoteInvoker

    protected Invoker remoteInvoker

  Invoker to the remote JMX node.

### localInvoker

    protected static Invoker localInvoker

  Static references to local invokers.

Constructor Detail

### InvokerInterceptor

    public InvokerInterceptor()

  Exposed for externalization.

Method Detail

### getLocal

    public static Invoker getLocal()

  Get the local invoker reference, useful for optimization.

### setLocal

    public static void setLocal(Invoker invoker)

  Set the local invoker reference, useful for optimization.

### isLocal

    public boolean isLocal()

  Returns wether we are local to the originating container or not.

### isLocal

    public boolean isLocal(Invocation invocation)

  Whether the target is local

  Parameters:
    `invocation` - the invocation
  Returns:
    true when the target is local

### invoke

    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.

  Specified by:
    `invoke` in class `Interceptor`
  Throws:
    `Exception`

### invokeLocal

    protected Object invokeLocal(Invocation invocation)
                          throws Exception

  Invoke using local invoker

  Parameters:
    `invocation` - the invocation
  Returns:
    the result
  Throws:
    `Exception` - for any error

### invokeMarshalled

    protected Object invokeMarshalled(Invocation invocation)
                               throws Exception

  Invoke using local invoker and marshalled

  Parameters:
    `invocation` - the invocation
  Returns:
    the result
  Throws:
    `Exception` - for any error

### invokeInvoker

    protected Object invokeInvoker(Invocation invocation)
                            throws Exception

  Invoke using invoker

  Parameters:
    `invocation` - the invocation
  Returns:
    the result
  Throws:
    `Exception` - for any error

### writeExternal

    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.

  Specified by:
    `writeExternal` in interface `Externalizable`
  Overrides:
    `writeExternal` in class `Interceptor`
  Throws:
    `IOException`

### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException,
                             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 `Externalizable`
  Overrides:
    `readExternal` in class `Interceptor`
  Throws:
    `IOException`
    `ClassNotFoundException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.