org.softamis.cluster4spring.rmi
Class RmiSingleUrlProxyFactoryBean<SI extends ServiceMoniker>

java.lang.Object
  extended by org.springframework.remoting.support.RemoteAccessor
      extended by org.softamis.cluster4spring.support.RemoteInvocationBasedAccessor
          extended by org.softamis.cluster4spring.support.RemoteClientInterceptor<RmiEndpoint<SI>,SI>
              extended by org.softamis.cluster4spring.rmi.support.RmiClientInterceptor<SI>
                  extended by org.softamis.cluster4spring.rmi.AbstractRmiProxyFactoryBean<SI>
                      extended by org.softamis.cluster4spring.rmi.support.AbstractRmiShortFormProxyFactoryBean<SI>
                          extended by org.softamis.cluster4spring.rmi.RmiSingleUrlProxyFactoryBean<SI>
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

public class RmiSingleUrlProxyFactoryBean<SI extends ServiceMoniker>
extends AbstractRmiShortFormProxyFactoryBean<SI>

Implementation of RmiProxyFactoryBean that allows more compact form of describing bean properteis in configuration xml. This implementation does not accept endpoint provider, but creates it internally. Due to this, class has several additional properties that are used to setup EndpointProvider

Current implementation is used to create SingleUrlEndpointProvider internally.

While this factory may be considered less flexible comparing to usual combination (RmiProxyFactoryBean/SingleUrlEndpointProvider), it can be defined in configuration files in more compact form.

Author:
Andrew Sazonov
See Also:
SingleUrlEndpointProvider

Field Summary
protected  SI fServiceUrl
           
 
Fields inherited from class org.softamis.cluster4spring.rmi.support.AbstractRmiShortFormProxyFactoryBean
fCacheEndpoints
 
Fields inherited from class org.softamis.cluster4spring.rmi.AbstractRmiProxyFactoryBean
fBeanFactory, fInterceptorNames, fRegisterTraceInterceptor, fRemoteInvocationTraceInterceptor, fServiceProxy
 
Fields inherited from class org.softamis.cluster4spring.rmi.support.RmiClientInterceptor
PROTOCOL_RMI
 
Fields inherited from class org.softamis.cluster4spring.support.RemoteClientInterceptor
fBeanName, fEndpointFactory, fEndpointProvider, fRefreshEndpointsOnConnectFailure, fRefreshEndpointsOnStartup, fSwitchEndpointOnFailure
 
Fields inherited from class org.softamis.cluster4spring.support.RemoteInvocationBasedAccessor
fRemoteInvocationFactory
 
Fields inherited from class org.springframework.remoting.support.RemoteAccessor
logger
 
Constructor Summary
RmiSingleUrlProxyFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
          Invoked by Spring as part of bean lifecycle and is used to check whether EndpointProvider is specified and perform other preparations
protected  SingleUrlEndpointProvider<RmiEndpoint<SI>,SI> createEndpointProvider()
           
 java.lang.String getServiceUrl()
          Returns information needed to discover remote service
 void setServiceUrl(java.lang.String aServiceURL)
           
 
Methods inherited from class org.softamis.cluster4spring.rmi.support.AbstractRmiShortFormProxyFactoryBean
isCacheEndpoints, setCacheEndpoints, setEndpointProvider
 
Methods inherited from class org.softamis.cluster4spring.rmi.AbstractRmiProxyFactoryBean
addSpecifiedAdvices, createDefaultRemoteInvocationTraceInterceptor, getEndpointFactory, getInterceptorNames, getObject, getObjectType, getProxyName, getRemoteInvocationTraceInterceptor, isRegisterTraceInterceptor, isSingleton, obtainRemoteInvocationTraceInterceptor, setBeanFactory, setEndpointFactory, setInterceptorNames, setRegisterTraceInterceptor, setRemoteInvocationTraceInterceptor
 
Methods inherited from class org.softamis.cluster4spring.rmi.support.RmiClientInterceptor
convertRmiAccessException, createDefaultEndpointFactory, doInvoke, getProtocol, isConnectFailure, isConnectFailureOnRemoteException, throwRmiAccessException
 
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.softamis.cluster4spring.support.RemoteInvocationBasedAccessor
getRemoteInvocationFactory, setRemoteInvocationFactory
 
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
 

Field Detail

fServiceUrl

protected SI extends ServiceMoniker fServiceUrl
Constructor Detail

RmiSingleUrlProxyFactoryBean

public RmiSingleUrlProxyFactoryBean()
Method Detail

createEndpointProvider

protected SingleUrlEndpointProvider<RmiEndpoint<SI>,SI> createEndpointProvider()

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Description copied from class: RemoteClientInterceptor
Invoked by Spring as part of bean lifecycle and is used to check whether EndpointProvider is specified and perform other preparations

Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Overrides:
afterPropertiesSet in class AbstractRmiProxyFactoryBean<SI extends ServiceMoniker>
Throws:
java.lang.Exception

getServiceUrl

public java.lang.String getServiceUrl()
Returns information needed to discover remote service

Returns:
service info

setServiceUrl

public void setServiceUrl(java.lang.String aServiceURL)