Klasse PsaRstApiEvtHdlOut

java.lang.Object
de.pisa.psa.rst.hdl.PsaRstApiEvtHdl
de.pisa.psa.rst.hdl.out.PsaRstApiEvtHdlOut
Alle implementierten Schnittstellen:
AutoCloseable
Bekannte direkte Unterklassen:
PsaRstApiEvtHdlOutDelete, PsaRstApiEvtHdlOutGet, PsaRstApiEvtHdlOutPatch, PsaRstApiEvtHdlOutPost, PsaRstApiEvtHdlOutPut

public abstract class PsaRstApiEvtHdlOut extends PsaRstApiEvtHdl
REST API: outgoing event handler
Seit:
07.08.2023
Autor:
weiland
  • Konstruktordetails

    • PsaRstApiEvtHdlOut

      public PsaRstApiEvtHdlOut(PsaRstApiEvtHdlDat data)
      Constructor
      Parameter:
      data - event data
  • Methodendetails

    • setBufferResponseEntity

      public void setBufferResponseEntity(boolean buffer)
      Control whether the received response entity should be buffered or not
      Parameter:
      buffer - if true it will be buffered (default=false)
    • setRequest

      public void setRequest(de.pisa.psc.srv.rst.PscRstCli client, Object entity)
      set the request data
      Parameter:
      client - REST client
      entity - payload entity
    • setRequestPath

      public void setRequestPath(String path)
      set the request path
      Parameter:
      path - path
    • getRequestPath

      public String getRequestPath()
      get the request path
      Gibt zurück:
      path
    • setRequestBody

      public void setRequestBody(Object body)
      set the request body
      Parameter:
      body - body
    • getRequestBody

      public String getRequestBody()
      get the request body
      Gibt zurück:
      body
    • setRequestHeader

      public void setRequestHeader(String header)
      set the request header
      Parameter:
      header - header
    • getRequestHeader

      public String getRequestHeader()
      get the request header
      Gibt zurück:
      header
    • setIAMKey

      public void setIAMKey(String key)
      get the key for the IAM properties
      Parameter:
      key - key
    • getIAMKey

      public String getIAMKey()
      set the key for the IAM properties
      Gibt zurück:
      key
    • sendRequest

      public javax.ws.rs.core.Response sendRequest(javax.ws.rs.core.Response data) throws Exception
      send a REST request
      Parameter:
      data - record data to send
      Gibt zurück:
      response of the called end point
      Löst aus:
      Exception
    • newRestClient

      protected de.pisa.psc.srv.rst.PscRstCli newRestClient(String url) throws URISyntaxException
      create a new REST client
      Parameter:
      url - target URL
      Gibt zurück:
      client
      Löst aus:
      URISyntaxException
    • sendRequest

      public javax.ws.rs.core.Response sendRequest(Object entity, javax.ws.rs.core.MediaType type) throws Exception
      send a REST request
      Parameter:
      entity - payload entity
      type - media type of the entity
      Gibt zurück:
      response of the called end point
      Löst aus:
      Exception
    • setAuthorization

      protected void setAuthorization(de.pisa.psc.srv.rst.PscRstCli client) throws Exception
      set the authorization for the REST client
      Parameter:
      client - REST client
      Löst aus:
      Exception
    • getEntity

      protected javax.ws.rs.client.Entity<?> getEntity(Object entity, javax.ws.rs.core.MediaType type)
      get an entity
      Parameter:
      entity - entity object
      type - type of the entity
      Gibt zurück:
      entity
    • sendPostRequest

      protected javax.ws.rs.core.Response sendPostRequest(de.pisa.psc.srv.rst.PscRstCli client, Object entity, javax.ws.rs.core.MediaType type) throws Exception
      send a POST request
      Parameter:
      client - REST client
      entity - payload entity
      type - media type of the entity
      Gibt zurück:
      response of the called end point
      Löst aus:
      Exception
    • sendPutRequest

      protected javax.ws.rs.core.Response sendPutRequest(de.pisa.psc.srv.rst.PscRstCli client, Object entity, javax.ws.rs.core.MediaType type) throws Exception
      send a PUT request
      Parameter:
      client - REST client
      entity - payload entity
      type - media type of the entity
      Gibt zurück:
      response of the called end point
      Löst aus:
      Exception
    • sendPatchRequest

      protected javax.ws.rs.core.Response sendPatchRequest(de.pisa.psc.srv.rst.PscRstCli client, Object entity, javax.ws.rs.core.MediaType type) throws Exception
      send a PATCH request
      Parameter:
      client - REST client
      entity - payload entity
      type - media type of the entity
      Gibt zurück:
      response of the called end point
      Löst aus:
      Exception
    • sendGetRequest

      protected javax.ws.rs.core.Response sendGetRequest(de.pisa.psc.srv.rst.PscRstCli client, Object entity, javax.ws.rs.core.MediaType type) throws Exception
      send a GET request
      Parameter:
      client - REST client
      entity - payload entity
      type - media type of the entity
      Gibt zurück:
      response of the called end point
      Löst aus:
      Exception
    • sendDeleteRequest

      protected javax.ws.rs.core.Response sendDeleteRequest(de.pisa.psc.srv.rst.PscRstCli client, Object entity, javax.ws.rs.core.MediaType type) throws Exception
      send a DELETE request
      Parameter:
      client - REST client
      entity - payload entity
      type - media type of the entity
      Gibt zurück:
      response of the called end point
      Löst aus:
      Exception
    • bufferEntity

      protected void bufferEntity(javax.ws.rs.core.Response response)
      Buffer the response entity.
      In case of an exception, the exception is logged.
      Parameter:
      response - response