Spring Framework

org.springframework.remoting.support
Class RemoteAccessor

java.lang.Object
  extended by org.springframework.remoting.support.RemotingSupport
      extended by org.springframework.remoting.support.RemoteAccessor
All Implemented Interfaces:
Aware, BeanClassLoaderAware
Direct Known Subclasses:
UrlBasedRemoteAccessor

public abstract class RemoteAccessor
extends RemotingSupport

Abstract base class for classes that access a remote service. Provides a "serviceInterface" bean property.

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.

Accessors are supposed to throw Spring's generic RemoteAccessException in case of remote invocation failure, provided that the service interface does not declare java.rmi.RemoteException.

Since:
13.05.2003
Author:
Juergen Hoeller
See Also:
RemoteAccessException, RemoteException

Field Summary
 
Fields inherited from class org.springframework.remoting.support.RemotingSupport
logger
 
Constructor Summary
RemoteAccessor()
           
 
Method Summary
 java.lang.Class getServiceInterface()
          Return the interface of the service to access.
 void setServiceInterface(java.lang.Class serviceInterface)
          Set the interface of the service to access.
 
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

RemoteAccessor

public RemoteAccessor()
Method Detail

setServiceInterface

public void setServiceInterface(java.lang.Class serviceInterface)
Set the interface of the service to access. The interface must be suitable for the particular service and remoting strategy.

Typically required to be able to create a suitable service proxy, but can also be optional if the lookup returns a typed proxy.


getServiceInterface

public java.lang.Class getServiceInterface()
Return the interface of the service to access.


Spring Framework