org.codehaus.xfire.service
Class DefaultServiceRegistry

java.lang.Object
  extended byorg.codehaus.xfire.service.DefaultServiceRegistry
All Implemented Interfaces:
ServiceRegistry

public class DefaultServiceRegistry
extends java.lang.Object
implements ServiceRegistry

Author:
Arjen Poutsma

Field Summary
 
Fields inherited from interface org.codehaus.xfire.service.ServiceRegistry
ROLE
 
Constructor Summary
DefaultServiceRegistry()
           
 
Method Summary
 void addRegistrationEventListener(RegistrationEventListener listener)
          Add a listener for registration events.
 Service getService(javax.xml.namespace.QName name)
          Returns the ServiceEndpoint with the given name, if found.
 Service getService(java.lang.String name)
          Returns the ServiceEndpoint with the given qualified name, if found.
 java.util.Collection getServices()
          Returns all ServiceEndpoint registered to this registry.
 boolean hasService(javax.xml.namespace.QName name)
          Indicates whether this registry has a service endpoint with the given name.
 boolean hasService(java.lang.String name)
          Indicates whether this registry has a service with the given name.
 void register(Service endpoint)
          Registers a given ServiceEndpoint with this registry.
 void removeRegistrationEventListener(RegistrationEventListener listener)
          Remove a listener for registration events.
 void unregister(Service endpoint)
          Unregisters the service with the given qualified name, if found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultServiceRegistry

public DefaultServiceRegistry()
Method Detail

getService

public Service getService(java.lang.String name)
Returns the ServiceEndpoint with the given qualified name, if found. Returns null if not found.

Specified by:
getService in interface ServiceRegistry
Parameters:
name - the service name.
Returns:
the service endpoint, or null if not found.

getService

public Service getService(javax.xml.namespace.QName name)
Description copied from interface: ServiceRegistry
Returns the ServiceEndpoint with the given name, if found. Returns null if not found.

Specified by:
getService in interface ServiceRegistry
Parameters:
name - the service name.
Returns:
the service endpoint, or null if not found.

register

public void register(Service endpoint)
Registers a given ServiceEndpoint with this registry.

Specified by:
register in interface ServiceRegistry
Parameters:
endpoint - the endpoint.

unregister

public void unregister(Service endpoint)
Unregisters the service with the given qualified name, if found.

Specified by:
unregister in interface ServiceRegistry

hasService

public boolean hasService(java.lang.String name)
Indicates whether this registry has a service with the given name.

Specified by:
hasService in interface ServiceRegistry
Parameters:
name - the service name.
Returns:
true if this registry has a service with the given name; false otherwise.

hasService

public boolean hasService(javax.xml.namespace.QName name)
Description copied from interface: ServiceRegistry
Indicates whether this registry has a service endpoint with the given name.

Specified by:
hasService in interface ServiceRegistry
Parameters:
name - the service name.
Returns:
true if this registry has a service with the given name; false otherwise.

getServices

public java.util.Collection getServices()
Returns all ServiceEndpoint registered to this registry.

Specified by:
getServices in interface ServiceRegistry
Returns:
all service endpoints.

addRegistrationEventListener

public void addRegistrationEventListener(RegistrationEventListener listener)
Add a listener for registration events.

Specified by:
addRegistrationEventListener in interface ServiceRegistry
Parameters:
listener - the listener.

removeRegistrationEventListener

public void removeRegistrationEventListener(RegistrationEventListener listener)
Remove a listener for registration events.

Specified by:
removeRegistrationEventListener in interface ServiceRegistry
Parameters:
listener - the listener.


Copyright © 2004-2006 null. All Rights Reserved.