org.eclipse.lyo.oslc4j.client

## Class ServiceProviderRegistryClient

- java.lang.Object
- - org.eclipse.lyo.oslc4j.client.ServiceProviderRegistryClient

-     public final class ServiceProviderRegistryClient
      extends Object

  This class provides methods to `register` and `deregister` `ServiceProvider`'s. This class also provides a method to `retrieve` the registered `ServiceProvider`'s.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServiceProviderRegistryClient(Set<Class<?>> providers)` Construct a client to assist with registering and deregistering `ServiceProvider`'s.
    `ServiceProviderRegistryClient(Set<Class<?>> providers, String mediaType)`
    `ServiceProviderRegistryClient(Set<Class<?>> providers, String mediaType, String uri)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `deregisterServiceProvider(URI serviceProviderURI)` Remove registration for a `ServiceProvider`.
    `OslcRestClient` | `getClient()`
    `ServiceProvider` | `getServiceProvider()` If a `ServiceProvider` is being used as a `ServiceProvider` registry without an owning `ServiceProviderCatalog`, this will return the `ServiceProvider`.
    `ServiceProviderCatalog` | `getServiceProviderCatalog()` If a `ServiceProviderCatalog` is being used, this will return that object.
    `ServiceProvider[]` | `getServiceProviders()` Return the registered `ServiceProvider`'s.
    `URI` | `registerServiceProvider(ServiceProvider serviceProviderToRegister)` Register a `ServiceProvider`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ServiceProviderRegistryClient

          public ServiceProviderRegistryClient(Set<Class<?>> providers,
                                       String mediaType,
                                       String uri)

    - #### ServiceProviderRegistryClient

          public ServiceProviderRegistryClient(Set<Class<?>> providers,
                                       String mediaType)

    - #### ServiceProviderRegistryClient

          public ServiceProviderRegistryClient(Set<Class<?>> providers)

      Construct a client to assist with registering and deregistering `ServiceProvider`'s.

  - ### Method Detail

    - #### registerServiceProvider

          public URI registerServiceProvider(ServiceProvider serviceProviderToRegister)
                                      throws OslcCoreApplicationException,
                                             URISyntaxException

      Register a `ServiceProvider`.
      Throws:
        `OslcCoreApplicationException`
        `URISyntaxException`

    - #### deregisterServiceProvider

          public void deregisterServiceProvider(URI serviceProviderURI)
                                         throws OslcCoreApplicationException

      Remove registration for a `ServiceProvider`.
      Throws:
        `OslcCoreApplicationException`

    - #### getServiceProviderCatalog

          public ServiceProviderCatalog getServiceProviderCatalog()

      If a `ServiceProviderCatalog` is being used, this will return that object. Otherwise null will be returned.

    - #### getServiceProvider

          public ServiceProvider getServiceProvider()

      If a `ServiceProvider` is being used as a `ServiceProvider` registry without an owning `ServiceProviderCatalog`, this will return the `ServiceProvider`. Otherwise null will be returned.

    - #### getServiceProviders

          public ServiceProvider[] getServiceProviders()

      Return the registered `ServiceProvider`'s.

    - #### getClient

          public OslcRestClient getClient()

Copyright © 2016. All rights reserved.