Package org.apache.cxf.bus.managers
Class ServiceContractResolverRegistryImpl
- java.lang.Object
-
- org.apache.cxf.bus.managers.ServiceContractResolverRegistryImpl
-
- All Implemented Interfaces:
ServiceContractResolverRegistry
public class ServiceContractResolverRegistryImpl extends Object implements ServiceContractResolverRegistry
A simple contract resolver registry. It maintains a list of contract resolvers in anArrayList
.
-
-
Constructor Summary
Constructors Constructor Description ServiceContractResolverRegistryImpl()
ServiceContractResolverRegistryImpl(Bus b)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description URI
getContractLocation(QName qname)
Calls each of the registeredServiceContractResolver
instances to resolve the location of the service's contract.protected List<ServiceContractResolver>
getResolvers()
boolean
isRegistered(ServiceContractResolver resolver)
Tests if a resolver is alreadey registered with this registry.void
register(ServiceContractResolver resolver)
Registers a contract resolver with this registry.void
setBus(Bus bus)
Sets the bus with which the registry is associated.void
unregister(ServiceContractResolver resolver)
Removes a contract resolver from this registry.
-
-
-
Constructor Detail
-
ServiceContractResolverRegistryImpl
public ServiceContractResolverRegistryImpl()
-
ServiceContractResolverRegistryImpl
public ServiceContractResolverRegistryImpl(Bus b)
-
-
Method Detail
-
setBus
public final void setBus(Bus bus)
Sets the bus with which the registry is associated.- Parameters:
bus
-
-
getContractLocation
public URI getContractLocation(QName qname)
Calls each of the registeredServiceContractResolver
instances to resolve the location of the service's contract. It returns the location from the first resolver that matches the QName to a location.- Specified by:
getContractLocation
in interfaceServiceContractResolverRegistry
- Parameters:
qname
- QName to be resolved into a contract location- Returns:
- URI representing the location of the contract
-
isRegistered
public boolean isRegistered(ServiceContractResolver resolver)
Tests if a resolver is alreadey registered with this registry.- Specified by:
isRegistered
in interfaceServiceContractResolverRegistry
- Parameters:
resolver
- the contract resolver for which to searche- Returns:
true
if the resolver is registered
-
register
public void register(ServiceContractResolver resolver)
Registers a contract resolver with this registry.- Specified by:
register
in interfaceServiceContractResolverRegistry
- Parameters:
resolver
- the contract resolver to register
-
unregister
public void unregister(ServiceContractResolver resolver)
Removes a contract resolver from this registry.- Specified by:
unregister
in interfaceServiceContractResolverRegistry
- Parameters:
resolver
- the contract resolver to remove
-
getResolvers
protected List<ServiceContractResolver> getResolvers()
-
-