|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jafer.registry.uddi.ServiceLocator
public class ServiceLocator
The service locator is responsible for finding providers and services in the registry. Usernames and passwords are not required to search the registry.
Field Summary | |
---|---|
protected static java.util.logging.Logger |
logger
Stores a reference to the Logger |
private int |
maxReturned
Stores a reference to the maximum objects to return on any find call, defaulted to 0 for no limit |
private org.uddi4j.client.UDDIProxy |
registryConnection
Stores a reference to the UDDI4J Proxy manager that communicates with the registry |
private TModelManager |
tModelManager
Stores a reference to the TModelManager that loads and initialises all the required TModels. |
Constructor Summary | |
---|---|
ServiceLocator(org.uddi4j.client.UDDIProxy registryConnection,
TModelManager tModelManager)
Constructor for the service locator. |
Method Summary | |
---|---|
private org.uddi4j.util.CategoryBag |
buildCategoryBag(java.util.List categories)
Builds a category bag containg all the categories to be used by the search |
private java.util.Vector |
buildNames(java.lang.String name)
Builds the vector of search names required for searching by name |
private org.uddi4j.util.FindQualifiers |
buildQualifiers(boolean useLogicalOR)
Builds the find qualifiers for the search |
private org.uddi4j.util.TModelBag |
buildTModelBag(java.util.List protocols)
Builds a tmodel bag containg all the protocols tmodels to be used by the search |
java.util.List |
findService(Category category)
Finds the services that have the supplied category attached |
java.util.List |
findService(Protocol protocol)
Finds the services that support the supplied protocol |
java.util.List |
findService(ServiceProviderInfo serviceProviderInfo)
Finds the services that match the supplied service provider info. |
java.util.List |
findService(ServiceProviderInfo serviceProviderInfo,
java.lang.String name,
java.util.List categories,
java.util.List protocols,
boolean useLogicalOR)
This method allows services to be located by using all the possible search combinations. |
java.util.List |
findService(java.lang.String name)
Finds the service that match the supplied name. |
java.util.List |
findServiceProvider(Category category)
Finds the service providers that have the supplied category attached |
java.util.List |
findServiceProvider(Protocol protocol)
Finds the service providers that have services supporting the supplied protocol |
java.util.List |
findServiceProvider(java.lang.String name)
Finds the service providers that match the supplied name. |
java.util.List |
findServiceProvider(java.lang.String name,
java.util.List categories,
java.util.List protocols,
boolean useLogicalOR)
This method allows service providers to be located by using all the possible search combinations. |
Service |
getService(ServiceInfo serviceInfo)
Retrieves the full service object for the supplied service info. |
Service |
getService(java.lang.String id)
Gets the service from its unique ID |
ServiceProvider |
getServiceProvider(Service service)
Gets the service provider that owns the service |
ServiceProvider |
getServiceProvider(ServiceProviderInfo providerInfo)
Retrieves the full service provider object for the supplied service provider info. |
ServiceProvider |
getServiceProvider(java.lang.String id)
Gets the service provider from its unique ID |
Service |
refreshService(Service service)
Returns the latest version of the service found. |
ServiceProvider |
refreshServiceProvider(ServiceProvider provider)
Returns the latest version of the service provider found. |
void |
setMaxReturned(int maxReturned)
Allows the caller to overload the default number of instances returned from a find call. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private TModelManager tModelManager
private int maxReturned
private org.uddi4j.client.UDDIProxy registryConnection
protected static java.util.logging.Logger logger
Constructor Detail |
---|
public ServiceLocator(org.uddi4j.client.UDDIProxy registryConnection, TModelManager tModelManager)
registryConnection
- The connection to the UDDI registrytModelManager
- The tmodel manager for the registry being accessed
by this managerMethod Detail |
---|
public void setMaxReturned(int maxReturned)
setMaxReturned
in interface ServiceLocator
maxReturned
- The maximum number of instances to returnpublic java.util.List findServiceProvider(java.lang.String name) throws RegistryException
findServiceProvider
in interface ServiceLocator
name
- The name of the provider to search for.
RegistryException
public java.util.List findServiceProvider(Category category) throws RegistryException
findServiceProvider
in interface ServiceLocator
category
- The category and value to search by
RegistryException
public java.util.List findServiceProvider(Protocol protocol) throws RegistryException
findServiceProvider
in interface ServiceLocator
protocol
- The protocol to search by
RegistryException
public java.util.List findServiceProvider(java.lang.String name, java.util.List categories, java.util.List protocols, boolean useLogicalOR) throws RegistryException
findServiceProvider
in interface ServiceLocator
name
- The name of the provider to search for.categories
- A list of categories and values to search byprotocols
- A list of protocols s to search byuseLogicalOR
- true to use OR operator, false to use AND operator
RegistryException
public ServiceProvider getServiceProvider(Service service) throws RegistryException
getServiceProvider
in interface ServiceLocator
service
- The service to search by
RegistryException
public ServiceProvider getServiceProvider(ServiceProviderInfo providerInfo) throws RegistryException
getServiceProvider
in interface ServiceLocator
providerInfo
- The service provider info identifying the service
provider to retrieve
RegistryException
public ServiceProvider refreshServiceProvider(ServiceProvider provider) throws RegistryException
refreshServiceProvider
in interface ServiceLocator
provider
- The provider to refresh
RegistryException
public java.util.List findService(ServiceProviderInfo serviceProviderInfo) throws RegistryException
findService
in interface ServiceLocator
serviceProviderInfo
- perform the search over the services on this
service provider
RegistryException
public java.util.List findService(java.lang.String name) throws RegistryException
findService
in interface ServiceLocator
name
- The name of the service to search for.
RegistryException
public java.util.List findService(Category category) throws RegistryException
findService
in interface ServiceLocator
category
- The category and value to search by
RegistryException
public java.util.List findService(Protocol protocol) throws RegistryException
findService
in interface ServiceLocator
protocol
- The protocol to search by
RegistryException
public java.util.List findService(ServiceProviderInfo serviceProviderInfo, java.lang.String name, java.util.List categories, java.util.List protocols, boolean useLogicalOR) throws RegistryException
findService
in interface ServiceLocator
serviceProviderInfo
- perform the search over the services on this
providername
- The name of the service to search for.categories
- A list of categories and values to search byprotocols
- A list of protocols s to search byuseLogicalOR
- true to use OR operator, false to use AND operator
RegistryException
public Service getService(ServiceInfo serviceInfo) throws RegistryException
getService
in interface ServiceLocator
serviceInfo
- The service info identifying the service to retrieve
RegistryException
public Service refreshService(Service service) throws RegistryException
refreshService
in interface ServiceLocator
service
- The service to refresh
RegistryException
public ServiceProvider getServiceProvider(java.lang.String id) throws RegistryException
getServiceProvider
in interface ServiceLocator
id
- The ID of the service provider
RegistryException
public Service getService(java.lang.String id) throws RegistryException
getService
in interface ServiceLocator
id
- The ID of the service
RegistryException
private java.util.Vector buildNames(java.lang.String name)
name
- The name of the service to search for.
private org.uddi4j.util.CategoryBag buildCategoryBag(java.util.List categories)
categories
- A list of categories and values to search by
private org.uddi4j.util.TModelBag buildTModelBag(java.util.List protocols) throws RegistryException
protocols
- A list of protocols to search by
RegistryException
private org.uddi4j.util.FindQualifiers buildQualifiers(boolean useLogicalOR)
useLogicalOR
- true to use OR operator, false to use AND operator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |