Class AbstractObjectStreamHandler
java.lang.Object
io.clonecloudstore.common.quarkus.server.service.StreamHandlerAbstract<AccessorObject,AccessorObject>
io.clonecloudstore.accessor.server.commons.AbstractObjectStreamHandler
- Direct Known Subclasses:
FakeStreamHandlerAbstract
,ObjectStreamHandler
,ObjectStreamHandler
@Dependent
public abstract class AbstractObjectStreamHandler
extends StreamHandlerAbstract<AccessorObject,AccessorObject>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AtomicReference
<AccessorObject> protected String
protected DriverApi
protected boolean
protected FilesystemHandler
protected AccessorFilter
protected boolean
protected final AccessorObjectServiceInterface
Fields inherited from class io.clonecloudstore.common.quarkus.server.service.StreamHandlerAbstract
countDownLatch, exceptionAtomicReference, resultProxy
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkPushAble
(AccessorObject object, MultipleActionsInputStream inputStream) Check if the request for POST is valid, and if so, adapt the given MultipleActionsInputStream that will be used to consume the original InputStream.protected AccessorObject
getAnswerPushInputStream
(AccessorObject object, String finalHash, long size) Returns a BusinessOut in case of POST (receiving InputStream on server side).getHeaderPullInputStream
(AccessorObject objectIn) Returns a Map for Headers response in case of GET, added to InputStream get above (server is sending the InputStream back to the client) (example: headers for object name, object size...)getHeaderPushInputStream
(AccessorObject objectIn, String finalHash, long size, AccessorObject objectOut) Returns a Map for Headers response in case of POST (receiving InputStream on server side).protected void
Method to override for post setupjakarta.ws.rs.core.Response
pullList()
Methods inherited from class io.clonecloudstore.common.quarkus.server.service.StreamHandlerAbstract
checkDigestToCompute, checkEndOfPush, checkPullAble, clear, doGetInputStream, endPush, getBusinessIn, getCloser, getHeaderError, getInputStreamLength, getOpId, getOriginalHash, getPullInputStream, getRequest, getServerStreamHandlerResponseException, getVertx, isAlreadyCompressed, isExternal, isKeepAlive, isKeepInputStreamCompressed, isResponseCompressed, isUpload, preparePull, pull, sendError, sendError, setKeepInputStreamCompressed, setResponseCompressed, setResultFromRemote, setup, shallCompress, shallDecompress, throwTrappedException, upload
-
Field Details
-
service
-
driverApi
-
filter
-
isListing
protected volatile boolean isListing -
clientId
-
external
protected boolean external -
checked
-
filesystemHandler
-
-
Constructor Details
-
AbstractObjectStreamHandler
-
-
Method Details
-
postSetup
protected void postSetup()Description copied from class:StreamHandlerAbstract
Method to override for post setup- Overrides:
postSetup
in classStreamHandlerAbstract<AccessorObject,
AccessorObject>
-
checkPushAble
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.- Specified by:
checkPushAble
in classStreamHandlerAbstract<AccessorObject,
AccessorObject>
-
getAnswerPushInputStream
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)- Specified by:
getAnswerPushInputStream
in classStreamHandlerAbstract<AccessorObject,
AccessorObject> - Parameters:
object
- businessIn as passed in constructorfinalHash
- the final Hash if computed on the fly, or the original given onesize
- the real size read (from received stream, could be compressed size if decompression is off at construction)
-
getHeaderPushInputStream
protected Map<String,String> getHeaderPushInputStream(AccessorObject objectIn, String finalHash, long size, AccessorObject objectOut) Description copied from class:StreamHandlerAbstract
Returns a Map for Headers response in case of POST (receiving InputStream on server side). (example: headers for object name, object size, ...)- Specified by:
getHeaderPushInputStream
in classStreamHandlerAbstract<AccessorObject,
AccessorObject> - Parameters:
objectIn
- businessIn as passed in constructorfinalHash
- the final Hash if computed on the fly, or the original given onesize
- the real size readobjectOut
- previously constructed from getAnswerPushInputStream
-
pullList
- Overrides:
pullList
in classStreamHandlerAbstract<AccessorObject,
AccessorObject> - Throws:
ServerStreamHandlerResponseException
-
getHeaderPullInputStream
Description copied from class:StreamHandlerAbstract
Returns a Map for Headers response in case of GET, added to InputStream get above (server is sending the InputStream back to the client) (example: headers for object name, object size...)- Specified by:
getHeaderPullInputStream
in classStreamHandlerAbstract<AccessorObject,
AccessorObject> - Parameters:
objectIn
- businessIn as passed in constructor
-