|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.proxy.Interceptor
org.jboss.invocation.InvokerInterceptor
public class InvokerInterceptor
A very simple implementation of it that branches to the local stuff.
Field Summary | |
---|---|
protected static Class |
invokerProxyHA
The InvokerProxyHA class |
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 | |
---|---|
protected org.jboss.remoting.serialization.IMarshalledValue |
createMarshalledValueForCallByValue(Object value)
|
static Invoker |
getLocal()
Get the local invoker reference, useful for optimization. |
boolean |
hasLocalTarget(Invocation invocation)
Whether there is a local target |
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 |
invokeLocalMarshalled(Invocation invocation)
This method is for local calls when using pass-by-value |
protected Object |
invokeMarshalled(Invocation invocation)
Invoke using local invoker and marshalled |
boolean |
isClustered(Invocation invocation)
Whether we are in a clustered environment |
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 |
---|
protected Invoker remoteInvoker
protected static Invoker localInvoker
protected static Class invokerProxyHA
Constructor Detail |
---|
public InvokerInterceptor()
Method Detail |
---|
public static Invoker getLocal()
public static void setLocal(Invoker invoker)
public boolean isLocal()
public boolean isLocal(Invocation invocation)
invocation
- the invocation
public boolean isClustered(Invocation invocation)
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.
invocation
- the invocation
public boolean hasLocalTarget(Invocation invocation)
invocation
-
public Object invoke(Invocation invocation) throws Exception
invoke
in class Interceptor
Exception
protected Object invokeLocal(Invocation invocation) throws Exception
invocation
- the invocation
Exception
- for any errorprotected Object invokeMarshalled(Invocation invocation) throws Exception
invocation
- the invocation
Exception
- for any errorprotected org.jboss.remoting.serialization.IMarshalledValue createMarshalledValueForCallByValue(Object value) throws IOException
IOException
protected Object invokeLocalMarshalled(Invocation invocation) throws Exception
Exception
protected Object invokeInvoker(Invocation invocation) throws Exception
invocation
- the invocation
Exception
- for any errorpublic void writeExternal(ObjectOutput out) throws IOException
If this instance lives in a different VM than its container invoker, the remote interface of the container invoker is not externalized.
writeExternal
in interface Externalizable
writeExternal
in class Interceptor
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
We check timestamps of the interfaces to see if the instance is in the original VM of creation
readExternal
in interface Externalizable
readExternal
in class Interceptor
IOException
ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |