|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.remoting.support.RemotingSupport org.springframework.remoting.support.RemoteAccessor org.springframework.remoting.support.UrlBasedRemoteAccessor org.springframework.remoting.support.RemoteInvocationBasedAccessor
public abstract class RemoteInvocationBasedAccessor
Abstract base class for remote service accessors that are based
on serialization of RemoteInvocation
objects.
Provides a "remoteInvocationFactory" property, with a
DefaultRemoteInvocationFactory
as default strategy.
setRemoteInvocationFactory(org.springframework.remoting.support.RemoteInvocationFactory)
,
RemoteInvocation
,
RemoteInvocationFactory
,
DefaultRemoteInvocationFactory
Field Summary |
---|
Fields inherited from class org.springframework.remoting.support.RemotingSupport |
---|
logger |
Constructor Summary | |
---|---|
RemoteInvocationBasedAccessor()
|
Method Summary | |
---|---|
protected RemoteInvocation |
createRemoteInvocation(MethodInvocation methodInvocation)
Create a new RemoteInvocation object for the given AOP method invocation. |
RemoteInvocationFactory |
getRemoteInvocationFactory()
Return the RemoteInvocationFactory used by this accessor. |
protected Object |
recreateRemoteInvocationResult(RemoteInvocationResult result)
Recreate the invocation result contained in the given RemoteInvocationResult object. |
void |
setRemoteInvocationFactory(RemoteInvocationFactory remoteInvocationFactory)
Set the RemoteInvocationFactory to use for this accessor. |
Methods inherited from class org.springframework.remoting.support.UrlBasedRemoteAccessor |
---|
afterPropertiesSet, getServiceUrl, setServiceUrl |
Methods inherited from class org.springframework.remoting.support.RemoteAccessor |
---|
getServiceInterface, setServiceInterface |
Methods inherited from class org.springframework.remoting.support.RemotingSupport |
---|
getBeanClassLoader, overrideThreadContextClassLoader, resetThreadContextClassLoader, setBeanClassLoader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RemoteInvocationBasedAccessor()
Method Detail |
---|
public void setRemoteInvocationFactory(RemoteInvocationFactory remoteInvocationFactory)
DefaultRemoteInvocationFactory
.
A custom invocation factory can add further context information to the invocation, for example user credentials.
public RemoteInvocationFactory getRemoteInvocationFactory()
protected RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation)
The default implementation delegates to the configured
RemoteInvocationFactory
.
This can be overridden in subclasses in order to provide custom RemoteInvocation
subclasses, containing additional invocation parameters (e.g. user credentials).
Note that it is preferable to build a custom RemoteInvocationFactory as a reusable strategy, instead of overriding this method.
methodInvocation
- the current AOP method invocation
RemoteInvocationFactory.createRemoteInvocation(org.aopalliance.intercept.MethodInvocation)
protected Object recreateRemoteInvocationResult(RemoteInvocationResult result) throws Throwable
The default implementation calls the default recreate()
method.
This can be overridden in subclass to provide custom recreation, potentially
processing the returned result object.
result
- the RemoteInvocationResult to recreate
Throwable
- if the invocation result is an exceptionRemoteInvocationResult.recreate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |