public class ClientPut extends ClientPutBase
Modifier and Type | Class and Description |
---|---|
static class |
ClientPut.COMPRESS_STATE |
ClientPutBase.UploadFrom
ClientRequest.Persistence
FILE_HASH, generatedURI, progressMessage, publicURI, putFailedMessage, SALT, succeeded
client, clientName, clientToken, completionTime, finished, global, identifier, lowLevelClient, origHandler, persistence, priorityClass, realTime, started, startupTime, uri, verbosity
Modifier | Constructor and Description |
---|---|
protected |
ClientPut() |
|
ClientPut(FCPConnectionHandler handler,
ClientPutMessage message,
FCPServer server) |
|
ClientPut(PersistentRequestClient globalClient,
FreenetURI uri,
java.lang.String identifier,
int verbosity,
java.lang.String charset,
short priorityClass,
ClientRequest.Persistence persistence,
java.lang.String clientToken,
boolean getCHKOnly,
boolean dontCompress,
int maxRetries,
ClientPutBase.UploadFrom uploadFromType,
java.io.File origFilename,
java.lang.String contentType,
RandomAccessBucket data,
FreenetURI redirectTarget,
java.lang.String targetFilename,
boolean earlyEncode,
boolean canWriteClientCache,
boolean forkOnCacheable,
int extraInsertsSingleBlock,
int extraInsertsSplitfileHeaderBlock,
boolean realTimeFlag,
InsertContext.CompatibilityMode compatMode,
byte[] overrideSplitfileKey,
boolean binaryBlob,
NodeClientCore core)
Fproxy
Creates a new persistent insert.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canRestart() |
protected void |
freeData()
Free cached data bucket(s)
|
boolean |
fullyResumed()
Return true if we resumed the original fetch from stored data (usually a file for a
splitfile download), rather than having to restart it (which happens in most other cases
when we resume).
|
protected ClientRequester |
getClientRequest() |
long |
getDataSize() |
FreenetURI |
getFinalURI() |
java.lang.String |
getMIMEType() |
java.io.File |
getOrigFilename() |
protected java.lang.String |
getTypeName() |
boolean |
hasSucceeded() |
void |
innerResume(ClientContext context) |
ClientPut.COMPRESS_STATE |
isCompressing()
Probably not meaningful for ClientPutDir's
|
boolean |
isDirect() |
protected void |
onStartCompressing() |
protected void |
onStopCompressing() |
protected FCPMessage |
persistentTagMessage() |
void |
requestWasRemoved(ClientContext context)
Called after a RemovePersistentRequest.
|
boolean |
restart(ClientContext context,
boolean disableFilterData) |
void |
setVarsRestart() |
void |
start(ClientContext context)
Start the request, if it has not already been started.
|
getFailedBlocks, getFailureMessage, getFailureReason, getFatalyFailedBlocks, getFetchedBlocks, getGeneratedURI, getMinBlocks, getSuccessFraction, getTotalBlocks, isTotalFinalized, onFailure, onFetchable, onGeneratedMetadata, onGeneratedURI, onLostConnection, onSuccess, receive, sendPendingMessages
cancel, dropped, finish, getClient, getClientDetail, getIdentifier, getLastActivity, getPriority, getRequestClient, getRequestIdentifier, hasFinished, hashCode, isGlobalQueue, isPersistent, isPersistentForever, isStarted, modifyRequest, onResume, onShutdown, restartAsync, restartFrom
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getRequestClient, onResume
public ClientPut(PersistentRequestClient globalClient, FreenetURI uri, java.lang.String identifier, int verbosity, java.lang.String charset, short priorityClass, ClientRequest.Persistence persistence, java.lang.String clientToken, boolean getCHKOnly, boolean dontCompress, int maxRetries, ClientPutBase.UploadFrom uploadFromType, java.io.File origFilename, java.lang.String contentType, RandomAccessBucket data, FreenetURI redirectTarget, java.lang.String targetFilename, boolean earlyEncode, boolean canWriteClientCache, boolean forkOnCacheable, int extraInsertsSingleBlock, int extraInsertsSplitfileHeaderBlock, boolean realTimeFlag, InsertContext.CompatibilityMode compatMode, byte[] overrideSplitfileKey, boolean binaryBlob, NodeClientCore core) throws IdentifierCollisionException, NotAllowedException, MetadataUnresolvedException, java.io.IOException
uri
- The URI to insert data toidentifier
- The identifier of the insertverbosity
- The verbosity bitmaskcharset
- TODOpriorityClass
- The priority for this insertpersistence
- The persistence type of this insertclientToken
- The client token of this insertgetCHKOnly
- Whether only the resulting CHK is requesteddontCompress
- Whether the file should not be compressedmaxRetries
- The maximum number of retriesuploadFromType
- Where the file is uploaded fromorigFilename
- The original filenamecontentType
- The content type of the datadata
- The data (may be null
if
uploadFromType
is UPLOAD_FROM_REDIRECT)redirectTarget
- The URI to redirect to (if uploadFromType
is
UPLOAD_FROM_REDIRECT)handler
- The FCP connection handlerglobal
- Whether this insert appears on the global queueIdentifierCollisionException
NotAllowedException
MetadataUnresolvedException
java.io.IOException
InsertException
public ClientPut(FCPConnectionHandler handler, ClientPutMessage message, FCPServer server) throws IdentifierCollisionException, MessageInvalidException, java.io.IOException
IdentifierCollisionException
MessageInvalidException
java.io.IOException
protected ClientPut()
public void start(ClientContext context)
ClientRequest
start
in class ClientRequest
protected void freeData()
ClientRequest
freeData
in class ClientRequest
protected ClientRequester getClientRequest()
getClientRequest
in class ClientRequest
protected FCPMessage persistentTagMessage()
persistentTagMessage
in class ClientPutBase
protected java.lang.String getTypeName()
getTypeName
in class ClientPutBase
public boolean hasSucceeded()
hasSucceeded
in class ClientRequest
public FreenetURI getFinalURI()
public boolean isDirect()
public java.io.File getOrigFilename()
public long getDataSize()
public java.lang.String getMIMEType()
public boolean canRestart()
canRestart
in class ClientRequest
public boolean restart(ClientContext context, boolean disableFilterData)
restart
in class ClientRequest
public void setVarsRestart()
setVarsRestart
in class ClientPutBase
public void requestWasRemoved(ClientContext context)
ClientRequest
requestWasRemoved
in class ClientPutBase
public ClientPut.COMPRESS_STATE isCompressing()
protected void onStartCompressing()
onStartCompressing
in class ClientPutBase
protected void onStopCompressing()
onStopCompressing
in class ClientPutBase
public void innerResume(ClientContext context) throws ResumeFailedException
innerResume
in class ClientRequest
ResumeFailedException
public boolean fullyResumed()
ClientRequest
fullyResumed
in class ClientRequest