com.ibm.zosconnect.spi

Interface ServiceController

  • All Superinterfaces:
    Service


    public interface ServiceController
    extends Service

    Defines a z/OS Connect Service that can be registered with the OSGI framework and consequently z/OS Connect from another OSGI service without the need for configuration file updates.

    Implementors can optionally provide a DataXform, and one or more Interceptor implementation instances to be associated with the service being registered.

    The OSGI Service registering an implementation instance of this interface is expected to manage its deregistration from the OSGI framework.

    ServiceControllerConstants defines a set of property keys that can be used to control behavior around the service being registered. A property with key com.ibm.wsspi.zos.connect.ServiceControllerConstants.SERVICE_NAME must be specified when registering the service. This property's value must be unique.

    Property updates to a registered service are not processed dynamically. Registered services must be deregistered, and registered again with the new property values.

    When an instance of this service is registered with z/OS Connect, any global settings configured under the zosConnectManager element in the server's configuration file will apply to this service.

    The following is an example of how to register a ServiceController implementation with the OSGI framework:

    Dictionary<String, Object> serviceProps = new Hashtable<String, Object>();
    serviceProps.put(ServiceControllerConstants.SERVICE_NAME, "bankingService");
    ServiceRegistration serviceReg = bundleContext.registerService(com.ibm.zosconnect.spi.ServiceController.class, new BankingServiceControllerImpl(), serviceProps);

    • Method Detail

      • getInterceptors

        Interceptor[] getInterceptors()
        Returns an array of Interceptor objects to be associated to the service implementing this interface when the service is registered with z/OS Connect.
        Returns:
        An array of interceptors object instances. Null if no interceptors are returned.
      • getDataXform

        DataXform getDataXform()
        Returns the DataXform object to be used for this service.
        Returns:
        A data transformer object instance. Null if no data transformer is returned.