|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.softamis.cluster4spring.support.provider.BaseEndpointProvider<E,SI> org.softamis.cluster4spring.support.provider.MultiURLEndpointProvider<E,SI>
SI
- type of data used to invoke remote service (such as remote service URL)E
- type of endpoints that could be created by this factorypublic abstract class MultiURLEndpointProvider<E extends Endpoint<SI>,SI extends ServiceMoniker>
Base abstract class to implement endpoint providers that hangle situation with several endpoints available for the same service. Since the same service could exists in several locations, it is possible that there will be several endpoints for the same service available.
Field Summary | |
---|---|
protected EndpointSelectionPolicy<E,SI> |
fEndpointSelectionPolicy
Policy used to select endpoints for invocation |
Fields inherited from class org.softamis.cluster4spring.support.provider.BaseEndpointProvider |
---|
fCacheEndpoints |
Constructor Summary | |
---|---|
protected |
MultiURLEndpointProvider()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
Invoked by Spring as part of bean lifecycle. |
protected void |
createDefaultEndpointSelectionPolicy()
Creates default endpoints selection policy if one is not specified explicitely. |
E |
getEndpoint(org.springframework.remoting.support.RemoteInvocationFactory aRemoteInvocationFactory,
EndpointFactory<E,SI> aEndpointFactory,
java.lang.String aBeanName)
Returns endpoint that will be used for remote service invocation. |
protected abstract java.util.List<E> |
getServiceEndpointsList(org.springframework.remoting.support.RemoteInvocationFactory aRemoteInvocationFactory,
EndpointFactory<E,SI> aEndpointFactory,
java.lang.String aBeanName)
Performs actual obtaining of list of available endpoints. |
void |
setEndpointSelectionPolicy(EndpointSelectionPolicy<E,SI> aEndpointSelectionPolicy)
Sets endpoint selection policy used to select endpoints from the list of endpoints available |
Methods inherited from class org.softamis.cluster4spring.support.provider.BaseEndpointProvider |
---|
doCreateServiceEndpoint, isCacheEndpoints, setCacheEndpoints |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.softamis.cluster4spring.support.EndpointProvider |
---|
markInvalid, refresh |
Field Detail |
---|
protected EndpointSelectionPolicy<E extends Endpoint<SI>,SI extends ServiceMoniker> fEndpointSelectionPolicy
Constructor Detail |
---|
protected MultiURLEndpointProvider()
Method Detail |
---|
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
createDefaultEndpointSelectionPolicy()
public E getEndpoint(org.springframework.remoting.support.RemoteInvocationFactory aRemoteInvocationFactory, EndpointFactory<E,SI> aEndpointFactory, java.lang.String aBeanName) throws org.springframework.remoting.RemoteAccessException
EndpointSelectionPolicy
and returns accepted
endpoint.
getEndpoint
in interface EndpointProvider<E extends Endpoint<SI>,SI extends ServiceMoniker>
aRemoteInvocationFactory
- factory used to create remote invocationsaEndpointFactory
- factory used to create endpointsaBeanName
- name of bean that is used as proxy for remote service
org.springframework.remoting.RemoteAccessException
- thrown if endpoint could not be selected of if
there are not currently available endpoints for remote servicecreateDefaultEndpointSelectionPolicy()
,
setEndpointSelectionPolicy(org.softamis.cluster4spring.support.EndpointSelectionPolicy)
,
getServiceEndpointsList(org.springframework.remoting.support.RemoteInvocationFactory,org.softamis.cluster4spring.support.EndpointFactory,String)
protected abstract java.util.List<E> getServiceEndpointsList(org.springframework.remoting.support.RemoteInvocationFactory aRemoteInvocationFactory, EndpointFactory<E,SI> aEndpointFactory, java.lang.String aBeanName) throws org.springframework.remoting.RemoteAccessException
aRemoteInvocationFactory
- factory used for remote invocationaEndpointFactory
- factory used for endpoints creationaBeanName
-
org.springframework.remoting.RemoteAccessException
protected void createDefaultEndpointSelectionPolicy()
LastAccessTimeEndpointSelectionPolicy
public void setEndpointSelectionPolicy(EndpointSelectionPolicy<E,SI> aEndpointSelectionPolicy)
aEndpointSelectionPolicy
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |