org.softamis.cluster4spring.rmi.support
Class AbstractRmiShortFormProxyFactoryBean<SI extends ServiceMoniker>
java.lang.Object
org.springframework.remoting.support.RemoteAccessor
org.softamis.cluster4spring.support.RemoteInvocationBasedAccessor
org.softamis.cluster4spring.support.RemoteClientInterceptor<RmiEndpoint<SI>,SI>
org.softamis.cluster4spring.rmi.support.RmiClientInterceptor<SI>
org.softamis.cluster4spring.rmi.AbstractRmiProxyFactoryBean<SI>
org.softamis.cluster4spring.rmi.support.AbstractRmiShortFormProxyFactoryBean<SI>
- Type Parameters:
SI
- type of data used to invoke remote service (such as remote service URL)
- All Implemented Interfaces:
- java.util.EventListener, org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationListener
- Direct Known Subclasses:
- RmiDiscoveringProxyFactoryBean, RmiSingleUrlProxyFactoryBean, RmiUrlListProxyFactoryBean
public abstract class AbstractRmiShortFormProxyFactoryBean<SI extends ServiceMoniker>
- extends AbstractRmiProxyFactoryBean<SI>
Base abstract class to implement RMI proxy factory beans that allows compact form of
bean definition in application context. These providers does not accept EndpointProviders
set externally during configuration. Instread, they create appropriate EndpointProviders
internally. To configure create endpoint providers, such factory beans have additional set of
properties needed by endpoint provider.
While factories extended from this class may be considered less flexible comparing to usual
combination (RmiProxyFactoryBean
/EndpointsProvider
), they can be
defined in configuration files in more compact form.
- Author:
- Andrew Sazonov
Field Summary |
protected boolean |
fCacheEndpoints
Indicates whether endpoints provider should cache obtained endpoints |
Fields inherited from class org.springframework.remoting.support.RemoteAccessor |
logger |
Methods inherited from class org.softamis.cluster4spring.rmi.AbstractRmiProxyFactoryBean |
addSpecifiedAdvices, afterPropertiesSet, createDefaultRemoteInvocationTraceInterceptor, getEndpointFactory, getInterceptorNames, getObject, getObjectType, getProxyName, getRemoteInvocationTraceInterceptor, isRegisterTraceInterceptor, isSingleton, obtainRemoteInvocationTraceInterceptor, setBeanFactory, setEndpointFactory, setInterceptorNames, setRegisterTraceInterceptor, setRemoteInvocationTraceInterceptor |
Methods inherited from class org.softamis.cluster4spring.support.RemoteClientInterceptor |
doInvoke, doPreprocessApplicationEvent, getBeanName, handleRemoteConnectFailure, invoke, isRefreshEndpointsOnConnectFailure, isRefreshEndpointsOnStartup, isSwitchEndpointOnFailure, markServiceInvalid, obtainEndpointToExecute, onApplicationEvent, onContextClosed, onContextRefreshed, prepare, refreshAndRetry, refreshEndpointProvider, retry, setBeanName, setRefreshEndpointsOnConnectFailure, setRefreshEndpointsOnStartup, setSwitchEndpointOnFailure, throwRemoteLookupFailureException, throwServiceException |
Methods inherited from class org.springframework.remoting.support.RemoteAccessor |
getServiceInterface, setServiceInterface |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fCacheEndpoints
protected boolean fCacheEndpoints
- Indicates whether endpoints provider should cache obtained endpoints
AbstractRmiShortFormProxyFactoryBean
protected AbstractRmiShortFormProxyFactoryBean()
setCacheEndpoints
public void setCacheEndpoints(boolean aCacheEndpoints)
- Sets option which specifies that discovered endpoints should cached for later use
- Parameters:
aCacheEndpoints
- true
if endpoints should be cached- See Also:
BaseEndpointProvider.setCacheEndpoints(boolean)
isCacheEndpoints
public boolean isCacheEndpoints()
- Returns option which specifies that discovered endpoints should cached for later use
- Returns:
true
if endpoints should be cached
setEndpointProvider
protected void setEndpointProvider(EndpointProvider<RmiEndpoint<SI>,SI> aEndpointProvider)
- Sets provider for endpoints used for remote services invocation. Current implementation throws
IllegalArgumetException
on attempt to specify endpoint provider externally, since
it's assumed that factories for more compact declaration will create all providers internally.
- Overrides:
setEndpointProvider
in class RemoteClientInterceptor<RmiEndpoint<SI extends ServiceMoniker>,SI extends ServiceMoniker>
- Parameters:
aEndpointProvider
- provider