com.ibm.wsspi.zos.connect

Interface Service

  • All Known Subinterfaces:
    ServiceController


    public interface Service
    Defines an OSGI service that provides a link between z/OS assets and clients trying to access those z/OS assets.

    If a data transformer has been defined to convert data on behalf of the service, it is expected that data conversion will be done for both input and output payloads by the defined data transformation service.

    If a data transformer has NOT been defined, input and output data conversion is expected to done by the service.

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.util.Map<java.lang.String,java.lang.Object> getData()
      Returns a map of JSON object compatible key value pairs representing information about the service.
      java.lang.String getProviderName()
      Returns the service provider's name.
      com.ibm.json.java.JSONObject getRequestSchema()
      Queries the service for the data transformation request schema used.
      com.ibm.json.java.JSONObject getResponseSchema()
      Queries the service for the data transformation response schema used.
      com.ibm.json.java.JSONObject getStatistics()
      Queries the service for statistic data.
      void invoke(java.util.Map<java.lang.Object,java.lang.Object> requestStateMap, HttpZosConnectRequest httpZosConnectRequest, RequestData requestData, ResponseData responseData)
      Processes a service invocation action.
      ServiceStatus start()
      Notifies the service that the server should be started.
      ServiceStatus status()
      Queries the service for its status.
      ServiceStatus stop()
      Notifies the service that a service should be stopped.
    • Method Detail

      • getProviderName

        java.lang.String getProviderName()
        Returns the service provider's name.
        Returns:
        The service provider's name.
      • getData

        java.util.Map<java.lang.String,java.lang.Object> getData()
                                                                 throws ServiceException
        Returns a map of JSON object compatible key value pairs representing information about the service.
        Returns:
        A map of key value pair values associated with a configured service.
        Throws:
        ServiceException
      • getRequestSchema

        com.ibm.json.java.JSONObject getRequestSchema()
                                                      throws ServiceException
        Queries the service for the data transformation request schema used.
        Returns:
        The JSON representation of the data transformation request schema.
        Throws:
        ServiceException
      • getResponseSchema

        com.ibm.json.java.JSONObject getResponseSchema()
                                                       throws ServiceException
        Queries the service for the data transformation response schema used.
        Returns:
        The JSON representation of the data transformation response schema.
        Throws:
        ServiceException
      • getStatistics

        com.ibm.json.java.JSONObject getStatistics()
                                                   throws ServiceException
        Queries the service for statistic data.
        Returns:
        The JSON representation of the data.
        Throws:
        ServiceException
      • invoke

        void invoke(java.util.Map<java.lang.Object,java.lang.Object> requestStateMap,
                  HttpZosConnectRequest httpZosConnectRequest,
                  RequestData requestData,
                  ResponseData responseData)
                    throws ServiceException
        Processes a service invocation action.
        Parameters:
        requestStateMap - A map object that holds implementor data that can be retrieved and/or updated by artifacts that have a reference to it (i.e. Interceptor.preInvoke(), Inteceptor.postInvoke()). z/OS Connect creates a new map and makes it available to the consuming artifacts per request. More specifically, z/OS Connect does not preserve this map or its contents across requests. The the life cycle of the map is that of a single request. Users must ensure that map key entries are unique. Key string entries starting with "IBM_ZOS_CONNECT" are reserved for z/OS Connect use.
        httpZosConnectRequest - A zosConnect representation of a HTTP servlet request.
        requestData - The request object to retrieve request data from.
        responseData - The response object to set response data to.
        Throws:
        ServiceException