Class AbstractHTTPWithJWTTokenAuthEventSender

    • Constructor Detail

      • AbstractHTTPWithJWTTokenAuthEventSender

        public AbstractHTTPWithJWTTokenAuthEventSender​(URL baseEndpointURL,
                                                       String clientId,
                                                       String clientSecret,
                                                       URL tokenURL)
    • Method Detail

      • getDefaultReadTimeout

        protected int getDefaultReadTimeout()
      • getDefaultConnectionTimeout

        protected int getDefaultConnectionTimeout()
      • getReadTimeout

        public int getReadTimeout()
      • setReadTimeout

        public void setReadTimeout​(int readTimeout)
      • getConnectionTimeout

        public int getConnectionTimeout()
      • setConnectionTimeout

        public void setConnectionTimeout​(int connectionTimeout)
      • send

        public void send​(Event event)
        Description copied from interface: EventSender
        Sends an event.
        Specified by:
        send in interface EventSender
        Parameters:
        event - the event to send
      • getLastSendHTTPResponseCode

        public int getLastSendHTTPResponseCode()
        Description copied from interface: EventSender
        Return the last send HTTP response code.
        Specified by:
        getLastSendHTTPResponseCode in interface EventSender
        Returns:
        the HTTP response code or -1 if an error occurred before the call (e.g. during the authorization or connection)
      • sendAndGetResult

        public String sendAndGetResult​(Event event)
        Description copied from interface: EventSender
        Send an event and get results.
        Specified by:
        sendAndGetResult in interface EventSender
        Parameters:
        event - the event to send
        Returns:
        the result of the call
      • retrive

        public org.json.simple.JSONObject retrive​(String id)
        Description copied from interface: EventSender
        Retrieves the instance of the provided workflow instance.
        Specified by:
        retrive in interface EventSender
        Parameters:
        id - the workflow instance id
        Returns:
      • getLastRetrieveHTTPResponseCode

        public int getLastRetrieveHTTPResponseCode()
        Description copied from interface: EventSender
        Return the last retrieve HTTP response code.
        Specified by:
        getLastRetrieveHTTPResponseCode in interface EventSender
        Returns:
        the HTTP response code or -1 if an error occurred before the call (e.g. during the authorization or connection)
      • getTokenURL

        protected URL getTokenURL()
      • getAuthorizationToken

        protected abstract org.gcube.oidc.rest.JWTToken getAuthorizationToken()
                                                                       throws org.gcube.oidc.rest.OpenIdConnectRESTHelperException
        Throws:
        org.gcube.oidc.rest.OpenIdConnectRESTHelperException