Class FakeStreamHandlerAbstract


@Dependent public abstract class FakeStreamHandlerAbstract extends AbstractObjectStreamHandler
  • Constructor Details Link icon

    • FakeStreamHandlerAbstract Link icon

      protected FakeStreamHandlerAbstract()
  • Method Details Link icon

    • postSetup Link icon

      protected void postSetup()
      Description copied from class: StreamHandlerAbstract
      Method to override for post setup
      Overrides:
      postSetup in class AbstractObjectStreamHandler
    • isPublic Link icon

      protected abstract boolean isPublic()
    • internalInitBeforeAction Link icon

      protected void internalInitBeforeAction()
      Initialize information from Headers
    • checkPushAble Link icon

      protected void checkPushAble(AccessorObject object, MultipleActionsInputStream inputStream)
      Description copied from class: StreamHandlerAbstract
      Check if the request for POST is valid, and if so, adapt the given MultipleActionsInputStream that will be used to consume the original InputStream. The implementation shall use the business logic to check the validity for this InputStream reception (from client to server) and, if valid, use the MultipleActionsInputStream, either as is or as a standard InputStream. (example: check through Object Storage that object does not exist yet, and if so add the consumption of the stream for the Object Storage object creation). Note that the stream might be kept compressed if keepInputStreamCompressed was specified at construction.
      Overrides:
      checkPushAble in class AbstractObjectStreamHandler
    • remoteCreation Link icon

      protected void remoteCreation(AccessorObject objectOut, String clientId)
      Could be overridden to take into account remote creation
    • getAnswerPushInputStream Link icon

      protected AccessorObject getAnswerPushInputStream(AccessorObject object, String finalHash, long size)
      Description copied from class: StreamHandlerAbstract
      Returns a BusinessOut in case of POST (receiving InputStream on server side). The implementation shall use the business logic to get the right BusinessOut object to return. (example: getting the StorageObject object, including the computed or given Hash)
      Overrides:
      getAnswerPushInputStream in class AbstractObjectStreamHandler
      Parameters:
      object - businessIn as passed in constructor
      finalHash - the final Hash if computed on the fly, or the original given one
      size - the real size read (from received stream, could be compressed size if decompression is off at construction)
    • checkRemotePullable Link icon

      protected boolean checkRemotePullable(AccessorObject object, io.vertx.core.MultiMap headers, String clientId)
      Could be overridden to take into account remote check
    • checkPullAble Link icon

      protected boolean checkPullAble(AccessorObject object, io.vertx.core.MultiMap headers)
      Description copied from class: StreamHandlerAbstract
      The implementation must check using business object that get inputStream request (server sending InputStream as result) is valid according to the businessIn from te Rest API and the headers. (example: ObjectStorage check of existence of object)
      Specified by:
      checkPullAble in class StreamHandlerAbstract<AccessorObject,AccessorObject>
      Returns:
      True if the read action is valid for this businessIn object and headers
    • internalCheckPullable Link icon

      protected boolean internalCheckPullable(AccessorObject object)
    • getRemotePullInputStream Link icon

      protected InputStream getRemotePullInputStream(AccessorObject object, String clientId)
      Could be overridden to use remote access
    • getPullInputStream Link icon

      protected InputStream getPullInputStream(AccessorObject object)
      Description copied from class: StreamHandlerAbstract
      Returns the InputStream required for GET (server is sending the InputStream back to the client). The implementation shall use the business logic and controls to get the InputStream to return. (example: getting the Object Storage object stream)
      Specified by:
      getPullInputStream in class StreamHandlerAbstract<AccessorObject,AccessorObject>
      Parameters:
      object - businessIn as passed in constructor
    • getHeaderError Link icon

      protected Map<String,String> getHeaderError(AccessorObject object, int status)
      Description copied from class: StreamHandlerAbstract
      Return headers for error message. (example: get headers in case of error as Object name, Bucket name...)
      Specified by:
      getHeaderError in class StreamHandlerAbstract<AccessorObject,AccessorObject>