java.lang.Object
org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2
org.codelibs.jcifs.smb.internal.smb2.Smb2CancelRequest
- All Implemented Interfaces:
CommonServerMessageBlock,CommonServerMessageBlockRequest,Message,Request
public class Smb2CancelRequest
extends ServerMessageBlock2
implements CommonServerMessageBlockRequest
SMB2 Cancel request message.
This command is used to cancel a previously sent command
that is still being processed by the server.
- Author:
- mbechler
-
Field Summary
Fields inherited from class org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2
SMB2_CANCEL, SMB2_CHANGE_NOTIFY, SMB2_CLOSE, SMB2_CREATE, SMB2_ECHO, SMB2_FLAGS_ASYNC_COMMAND, SMB2_FLAGS_DFS_OPERATIONS, SMB2_FLAGS_PRIORITY_MASK, SMB2_FLAGS_RELATED_OPERATIONS, SMB2_FLAGS_REPLAY_OPERATION, SMB2_FLAGS_SERVER_TO_REDIR, SMB2_FLAGS_SIGNED, SMB2_FLUSH, SMB2_IOCTL, SMB2_LOCK, SMB2_LOGOFF, SMB2_NEGOTIATE, SMB2_OPLOCK_BREAK, SMB2_QUERY_DIRECTORY, SMB2_QUERY_INFO, SMB2_READ, SMB2_SESSION_SETUP, SMB2_SET_INFO, SMB2_TREE_CONNECT, SMB2_TREE_DISCONNECT, SMB2_WRITE -
Constructor Summary
ConstructorsConstructorDescriptionSmb2CancelRequest(Configuration config, long mid, long asyncId) Constructs a SMB2 cancel request -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if chaining is allowed with the next request.Creates a cancel request for this request.intGets the number of credits this request requires.getNext()Gets the next message in the compound chain.Gets the custom response timeout for this request.booleanisCancel()Checks if this is a cancel request.booleanChecks if the request will be handled asynchronously.protected intreadBytesWireFormat(byte[] buffer, int bufferIndex) Reads the message body from the wire format.voidsetRequestCredits(int credits) Sets the number of request credits.voidsetTid(int t) Sets the tree ID.intsize()Gets the size of this message.split()Splits this request for processing.protected intwriteBytesWireFormat(byte[] dst, int dstIndex) Writes the message body to the wire format.Methods inherited from class org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2
addFlags, chain, clearFlags, decode, decode, encode, equals, getAsyncId, getCommand, getConfig, getCredit, getCreditCharge, getDigest, getErrorContextCount, getErrorData, getFlags, getHeaderStart, getLength, getMid, getNextCommandOffset, getRawPayload, getResponse, getSessionId, getStatus, getTreeId, hashCode, haveResponse, isAsync, isErrorResponseStatus, isRetainPayload, pad8, readErrorResponse, readHeaderWireFormat, reset, retainPayload, setAsyncId, setCommand, setCredit, setDigest, setExtendedSecurity, setMid, setNext, setRawPayload, setReadSize, setResponse, setSessionId, setTreeId, setUid, size8, size8, toString, writeHeaderWireFormatMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.codelibs.jcifs.smb.internal.CommonServerMessageBlock
decode, encode, getCommand, getDigest, getMid, getResponse, reset, setCommand, setDigest, setExtendedSecurity, setMid, setResponse, setSessionId, setUidMethods inherited from interface org.codelibs.jcifs.smb.util.transport.Message
getRawPayload, isRetainPayload, retainPayload, setRawPayloadMethods inherited from interface org.codelibs.jcifs.smb.util.transport.Request
getResponse
-
Constructor Details
-
Smb2CancelRequest
Constructs a SMB2 cancel request- Parameters:
config- The configuration to usemid- The message ID of the request to cancelasyncId- The async ID for asynchronous operations (0 for synchronous)
-
-
Method Details
-
getCreditCost
public int getCreditCost()Gets the number of credits this request requires.- Specified by:
getCreditCostin interfaceRequest- Returns:
- number of credits this request requires
- See Also:
-
isResponseAsync
public boolean isResponseAsync()Checks if the request will be handled asynchronously.- Specified by:
isResponseAsyncin interfaceCommonServerMessageBlockRequest- Returns:
- request was handled asynchronously
- See Also:
-
getNext
Description copied from class:ServerMessageBlock2Gets the next message in the compound chain.- Specified by:
getNextin interfaceCommonServerMessageBlockRequest- Specified by:
getNextin interfaceRequest- Overrides:
getNextin classServerMessageBlock2- Returns:
- the next message or null if this is the last message
-
getOverrideTimeout
Gets the custom response timeout for this request.- Specified by:
getOverrideTimeoutin interfaceCommonServerMessageBlockRequest- Returns:
- custom response timeout for this request
- See Also:
-
allowChain
Checks if chaining is allowed with the next request.- Specified by:
allowChainin interfaceCommonServerMessageBlockRequest- Parameters:
next- the next request in the chain- Returns:
- whether to allow chaining
- See Also:
-
split
Splits this request for processing.- Specified by:
splitin interfaceCommonServerMessageBlockRequest- Returns:
- the following message
- See Also:
-
createCancel
Creates a cancel request for this request.- Specified by:
createCancelin interfaceCommonServerMessageBlockRequest- Returns:
- create cancel request
- See Also:
-
setRequestCredits
public void setRequestCredits(int credits) Sets the number of request credits.- Specified by:
setRequestCreditsin interfaceRequest- Parameters:
credits- the number of credits to set- See Also:
-
setTid
public void setTid(int t) Sets the tree ID.- Specified by:
setTidin interfaceCommonServerMessageBlockRequest- Parameters:
t- the tree ID to set- See Also:
-
isCancel
public boolean isCancel()Checks if this is a cancel request. -
size
public int size()Gets the size of this message.- Specified by:
sizein interfaceCommonServerMessageBlockRequest- Returns:
- the size of this message
- See Also:
-
writeBytesWireFormat
protected int writeBytesWireFormat(byte[] dst, int dstIndex) Writes the message body to the wire format.- Specified by:
writeBytesWireFormatin classServerMessageBlock2- Parameters:
dst- the destination bufferdstIndex- the starting position in the buffer- Returns:
- number of bytes written
- See Also:
-
readBytesWireFormat
protected int readBytesWireFormat(byte[] buffer, int bufferIndex) Reads the message body from the wire format.- Specified by:
readBytesWireFormatin classServerMessageBlock2- Parameters:
buffer- the buffer to read frombufferIndex- the starting position in the buffer- Returns:
- number of bytes read
- See Also:
-