org.kuali.rice.ksb.messaging
Class RemoteResourceServiceLocatorImpl
java.lang.Object
org.kuali.rice.core.lifecycle.BaseLifecycle
org.kuali.rice.core.resourceloader.ResourceLoaderContainer
org.kuali.rice.ksb.messaging.RemoteResourceServiceLocatorImpl
- All Implemented Interfaces:
- Runnable, Lifecycle, ObjectLoader, ResourceLoader, ServiceLocator, RemoteResourceServiceLocator
public class RemoteResourceServiceLocatorImpl
- extends ResourceLoaderContainer
- implements Runnable, RemoteResourceServiceLocator
Methods inherited from class org.kuali.rice.core.resourceloader.ResourceLoaderContainer |
addResourceLoader, addResourceLoaderFirst, containsResourceLoader, getContents, getName, getResourceLoader, getResourceLoaderNames, getResourceLoaders, removeAllResourceLoaders, removeResourceLoader, setName, toString |
LOG
private static final org.apache.log4j.Logger LOG
randomNumber
private Random randomNumber
started
private boolean started
future
private ScheduledFuture future
clients
private Map<QName,List<RemotedServiceHolder>> clients
clientsMutex
private Object clientsMutex
RemoteResourceServiceLocatorImpl
public RemoteResourceServiceLocatorImpl(QName name)
removeService
public void removeService(ServiceInfo serviceInfo)
- Specified by:
removeService
in interface RemoteResourceServiceLocator
removeServiceFromCollection
private boolean removeServiceFromCollection(ServiceInfo serviceInfo,
List<RemotedServiceHolder> serviceList)
- Removes a service (its RemotedServiceHolder wrapper) from the list of
services. This isn't very efficient but for time reasons hashcode and
equals wasn't implemented on the RemotedServiceHolder and IPTable, which
is a member of the RemotedServiceHolder.
- Parameters:
service
- serviceList
-
- Returns:
- boolean indicating if the entry was removed from the list
getService
public Object getService(QName serviceName)
- Fetches a service from the client proxies configured in this resource
loader.
- Specified by:
getService
in interface ServiceLocator
- Overrides:
getService
in class ResourceLoaderContainer
getService
public Object getService(QName qName,
String url)
- Specified by:
getService
in interface RemoteResourceServiceLocator
getServiceNamesForUnqualifiedName
public List<QName> getServiceNamesForUnqualifiedName(String unqualifiedServiceName)
- Specified by:
getServiceNamesForUnqualifiedName
in interface RemoteResourceServiceLocator
getRemotedServiceHolderFromList
public ServiceHolder getRemotedServiceHolderFromList(List<RemotedServiceHolder> remotedServices)
getAllServices
public List<RemotedServiceHolder> getAllServices(QName qName)
- Returns an immutable list of services.
- Specified by:
getAllServices
in interface RemoteResourceServiceLocator
refresh
public void refresh()
- Specified by:
refresh
in interface RemoteResourceServiceLocator
run
public void run()
- Specified by:
run
in interface Runnable
registerClient
private void registerClient(ServiceInfo serviceInfo,
Map<QName,List<RemotedServiceHolder>> clientMap)
installAlternateEndpoint
protected void installAlternateEndpoint(ServiceInfo serviceInfo)
isStarted
public boolean isStarted()
- Specified by:
isStarted
in interface Lifecycle
- Overrides:
isStarted
in class BaseLifecycle
start
public void start()
throws Exception
- Specified by:
start
in interface Lifecycle
- Overrides:
start
in class ResourceLoaderContainer
- Throws:
Exception
stop
public void stop()
throws Exception
- Specified by:
stop
in interface Lifecycle
- Overrides:
stop
in class ResourceLoaderContainer
- Throws:
Exception
getObject
public Object getObject(ObjectDefinition definition)
- Description copied from interface:
ObjectLoader
- Constructs an instance of the Object using the given ObjectDefinition classname.
- Specified by:
getObject
in interface ObjectLoader
- Overrides:
getObject
in class ResourceLoaderContainer
getMessageExceptionHandler
public MessageExceptionHandler getMessageExceptionHandler(QName qname)
- Specified by:
getMessageExceptionHandler
in interface RemoteResourceServiceLocator
getClients
public Map<QName,List<RemotedServiceHolder>> getClients()
- Specified by:
getClients
in interface RemoteResourceServiceLocator
setClients
public void setClients(Map<QName,List<RemotedServiceHolder>> clients)
Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.