- All Superinterfaces:
Message
- All Known Subinterfaces:
CommonServerMessageBlockResponse,NotifyResponse,SmbNegotiationResponse,TreeConnectResponse
- All Known Implementing Classes:
AndXServerMessageBlock,NetServerEnum2,NetServerEnum2Response,NetShareEnum,NetShareEnumResponse,NtTransNotifyChange,NtTransNotifyChangeResponse,NtTransQuerySecurityDesc,NtTransQuerySecurityDescResponse,ServerMessageBlock,ServerMessageBlock2Response,Smb2ChangeNotifyResponse,Smb2CloseResponse,Smb2CreateResponse,Smb2EchoResponse,Smb2FlushResponse,Smb2IoctlResponse,Smb2LockResponse,Smb2LogoffResponse,Smb2NegotiateResponse,Smb2OplockBreakNotification,Smb2QueryDirectoryResponse,Smb2QueryInfoResponse,Smb2ReadResponse,Smb2SessionSetupResponse,Smb2SetInfoResponse,Smb2TreeConnectResponse,Smb2TreeDisconnectResponse,Smb2WriteResponse,SmbComBlankResponse,SmbComClose,SmbComCreateDirectory,SmbComDelete,SmbComDeleteDirectory,SmbComFindClose2,SmbComLockingAndX,SmbComLogoffAndX,SmbComNegotiate,SmbComNegotiateResponse,SmbComNtCancel,SmbComNTCreateAndX,SmbComNTCreateAndXResponse,SmbComNtTransaction,SmbComNtTransactionResponse,SmbComOpenAndX,SmbComOpenAndXResponse,SmbComQueryInformation,SmbComQueryInformationResponse,SmbComReadAndX,SmbComReadAndXResponse,SmbComRename,SmbComSeek,SmbComSeekResponse,SmbComSessionSetupAndX,SmbComSessionSetupAndXResponse,SmbComSetInformation,SmbComSetInformationResponse,SmbComTransaction,SmbComTransactionResponse,SmbComTreeConnectAndX,SmbComTreeConnectAndXResponse,SmbComTreeDisconnect,SmbComWrite,SmbComWriteAndX,SmbComWriteAndXResponse,SmbComWriteResponse,Trans2FindFirst2,Trans2FindFirst2Response,Trans2FindNext2,Trans2GetDfsReferral,Trans2GetDfsReferralResponse,Trans2QueryFSInformation,Trans2QueryFSInformationResponse,Trans2QueryPathInformation,Trans2QueryPathInformationResponse,Trans2SetFileInformation,Trans2SetFileInformationResponse,TransCallNamedPipe,TransCallNamedPipeResponse,TransPeekNamedPipe,TransPeekNamedPipeResponse,TransTransactNamedPipe,TransTransactNamedPipeResponse,TransWaitNamedPipe,TransWaitNamedPipeResponse
Interface for transport response messages.
This interface represents responses received from network transports.
-
Method Summary
Modifier and TypeMethodDescriptionvoidUnset received statusvoiderror()Set error statusvoidSets an exception for this response.intGets the error status code.Gets the exception associated with this response.Gets the expiration time for this response.intGets the number of credits granted by the server.longgetMid()Gets the message ID.Gets the next response in the chain.booleanisError()Checks if the response indicates an error.booleanChecks if the response has been received.booleanChecks if signature verification failed.voidreceived()Set received statusvoidreset()Resets this response to its initial state.voidsetExpiration(Long exp) Sets the expiration time for this response.voidsetMid(long k) Sets the message ID.booleanverifySignature(byte[] buffer, int i, int size) Verifies the signature of this response.Methods inherited from interface org.codelibs.jcifs.smb.util.transport.Message
getRawPayload, isRetainPayload, retainPayload, setRawPayload
-
Method Details
-
isReceived
boolean isReceived()Checks if the response has been received.- Returns:
- whether the response is received
-
received
void received()Set received status -
clearReceived
void clearReceived()Unset received status -
getGrantedCredits
int getGrantedCredits()Gets the number of credits granted by the server.- Returns:
- number of credits granted by the server
-
getErrorCode
int getErrorCode()Gets the error status code.- Returns:
- status code
-
setMid
void setMid(long k) Sets the message ID.- Parameters:
k- the message ID to set
-
getMid
long getMid()Gets the message ID.- Returns:
- mid
-
verifySignature
boolean verifySignature(byte[] buffer, int i, int size) Verifies the signature of this response.- Parameters:
buffer- the buffer containing the signature datai- the starting index in the buffersize- the size of the signature data- Returns:
- whether signature verification is successful
-
isVerifyFailed
boolean isVerifyFailed()Checks if signature verification failed.- Returns:
- whether signature verification failed
-
isError
boolean isError()Checks if the response indicates an error.- Returns:
- whether the response is an error
-
error
void error()Set error status -
getExpiration
Long getExpiration()Gets the expiration time for this response.- Returns:
- the message timeout
-
setExpiration
Sets the expiration time for this response.- Parameters:
exp- the message timeout to set
-
reset
void reset()Resets this response to its initial state. -
getException
Exception getException()Gets the exception associated with this response.- Returns:
- an exception linked to an error
-
exception
Sets an exception for this response.- Parameters:
e- the exception to set
-
getNextResponse
Response getNextResponse()Gets the next response in the chain.- Returns:
- chained response
-