|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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>
SI
- type of data used to invoke remote service (such as remote service URL)public class RmiClientInterceptor<SI extends ServiceMoniker>
Interceptor for accessing remote services via RMI. Adds processing or RMI specific
exceptions in doInvoke
method.
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
fLog
|
static java.lang.String |
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 | |
---|---|
RmiClientInterceptor()
|
Method Summary | |
---|---|
protected java.lang.Exception |
convertRmiAccessException(java.lang.reflect.Method aMethod,
java.rmi.RemoteException aRemoteException,
boolean aConnectFailure,
SI aServiceInfo)
Utility method used to convert remote exception to corresponding RemoteAccessException |
protected EndpointFactory<RmiEndpoint<SI>,SI> |
createDefaultEndpointFactory()
Creates default endpoint factory used to create RMI endpoints. |
protected java.lang.Object |
doInvoke(org.aopalliance.intercept.MethodInvocation aInvocation,
RmiEndpoint<SI> aServiceEndpoint)
Perform the given aInvocation on the given RMI aStub. |
protected java.lang.String |
getProtocol()
Returns protocol which identifies interceptor. |
protected boolean |
isConnectFailure(org.springframework.remoting.RemoteAccessException aException)
Determine whether the given RMI exception indicates a connect failure. |
protected boolean |
isConnectFailureOnRemoteException(java.rmi.RemoteException aRemoteException)
Utility method to definie whether given remote excption indicates a connect failure. |
protected void |
throwRmiAccessException(org.aopalliance.intercept.MethodInvocation aInvocation,
java.rmi.RemoteException aRemoteException,
RmiEndpoint<SI> aServiceEndpoint)
Utility method to throw RmiAccessException Utility method to throw RmiAccessException |
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 |
---|
protected static final org.apache.commons.logging.Log fLog
public static final java.lang.String PROTOCOL_RMI
Constructor Detail |
---|
public RmiClientInterceptor()
Method Detail |
---|
protected java.lang.String getProtocol()
getProtocol
in class RemoteClientInterceptor<RmiEndpoint<SI extends ServiceMoniker>,SI extends ServiceMoniker>
protected EndpointFactory<RmiEndpoint<SI>,SI> createDefaultEndpointFactory()
createDefaultEndpointFactory
in class RemoteClientInterceptor<RmiEndpoint<SI extends ServiceMoniker>,SI extends ServiceMoniker>
RmiEndpointFactory
protected boolean isConnectFailure(org.springframework.remoting.RemoteAccessException aException)
isConnectFailure
in class RemoteClientInterceptor<RmiEndpoint<SI extends ServiceMoniker>,SI extends ServiceMoniker>
aException
- the RMI exception to check
RmiClientInterceptorUtils.isConnectFailure(java.rmi.RemoteException)
protected boolean isConnectFailureOnRemoteException(java.rmi.RemoteException aRemoteException)
aRemoteException
- exception to inspect
true
if given exception indicates a connect failureprotected java.lang.Object doInvoke(org.aopalliance.intercept.MethodInvocation aInvocation, RmiEndpoint<SI> aServiceEndpoint) throws java.lang.Throwable
doInvoke
in class RemoteClientInterceptor<RmiEndpoint<SI extends ServiceMoniker>,SI extends ServiceMoniker>
aInvocation
- the AOP method aInvocationaServiceEndpoint
- the RMI aStub to invoke
java.lang.Throwable
- in case of aInvocation failureprotected void throwRmiAccessException(org.aopalliance.intercept.MethodInvocation aInvocation, java.rmi.RemoteException aRemoteException, RmiEndpoint<SI> aServiceEndpoint) throws java.lang.Exception
aInvocation
- aRemoteException
- aServiceEndpoint
-
java.lang.Exception
protected java.lang.Exception convertRmiAccessException(java.lang.reflect.Method aMethod, java.rmi.RemoteException aRemoteException, boolean aConnectFailure, SI aServiceInfo)
RemoteAccessException
aMethod
- methods that threw exceptionaRemoteException
- remote exceptionaConnectFailure
- true if exception is connect failureaServiceInfo
- information about service url where remote exception occured
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |