|
|||||||||
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.RemoteExporter
public abstract class RemoteExporter
Abstract base class for classes that export a remote service. Provides "service" and "serviceInterface" bean properties.
Note that the service interface being used will show some signs of remotability, like the granularity of method calls that it offers. Furthermore, it has to have serializable arguments etc.
Field Summary | |
---|---|
private java.lang.Object[] |
interceptors
|
private java.lang.Boolean |
registerTraceInterceptor
|
private java.lang.Object |
service
|
private java.lang.Class |
serviceInterface
|
Fields inherited from class org.springframework.remoting.support.RemotingSupport |
---|
logger |
Constructor Summary | |
---|---|
RemoteExporter()
|
Method Summary | |
---|---|
protected void |
checkService()
Check whether the service reference has been set. |
protected void |
checkServiceInterface()
Check whether a service reference has been set, and whether it matches the specified service. |
protected java.lang.String |
getExporterName()
Return a short name for this exporter. |
protected java.lang.Object |
getProxyForService()
Get a proxy for the given service object, implementing the specified service interface. |
java.lang.Object |
getService()
Return the service to export. |
java.lang.Class |
getServiceInterface()
Return the interface of the service to export. |
void |
setInterceptors(java.lang.Object[] interceptors)
Set additional interceptors (or advisors) to be applied before the remote endpoint, e.g. |
void |
setRegisterTraceInterceptor(boolean registerTraceInterceptor)
Set whether to register a RemoteInvocationTraceInterceptor for exported services. |
void |
setService(java.lang.Object service)
Set the service to export. |
void |
setServiceInterface(java.lang.Class serviceInterface)
Set the interface of the service to export. |
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 |
Field Detail |
---|
private java.lang.Object service
private java.lang.Class serviceInterface
private java.lang.Boolean registerTraceInterceptor
private java.lang.Object[] interceptors
Constructor Detail |
---|
public RemoteExporter()
Method Detail |
---|
public void setService(java.lang.Object service)
public java.lang.Object getService()
public void setServiceInterface(java.lang.Class serviceInterface)
public java.lang.Class getServiceInterface()
public void setRegisterTraceInterceptor(boolean registerTraceInterceptor)
getProxyForService
for creating the proxy to expose.
Default is "true". RemoteInvocationTraceInterceptor's most important value is that it logs exception stacktraces on the server, before propagating an exception to the client. Note that RemoteInvocationTraceInterceptor will not be registered by default if the "interceptors" property has been specified.
setInterceptors(java.lang.Object[])
,
getProxyForService()
,
RemoteInvocationTraceInterceptor
public void setInterceptors(java.lang.Object[] interceptors)
You may specify any AOP Alliance MethodInterceptors or other Spring AOP Advices, as well as Spring AOP Advisors.
getProxyForService()
,
PerformanceMonitorInterceptor
protected void checkService() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
setService(java.lang.Object)
protected void checkServiceInterface() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
setServiceInterface(java.lang.Class)
,
setService(java.lang.Object)
protected java.lang.Object getProxyForService()
Used to export a proxy that does not expose any internals but just
a specific interface intended for remote access. Furthermore, a
RemoteInvocationTraceInterceptor
will be registered (by default).
setServiceInterface(java.lang.Class)
,
setRegisterTraceInterceptor(boolean)
,
RemoteInvocationTraceInterceptor
protected java.lang.String getExporterName()
Default is the unqualified class name (without package). Can be overridden in subclasses.
getProxyForService()
,
RemoteInvocationTraceInterceptor
,
ClassUtils.getShortName(java.lang.String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |