Class NfsRequestBase
java.lang.Object
com.emc.ecs.nfsclient.rpc.RpcRequest
com.emc.ecs.nfsclient.nfs.NfsRequestBase
- All Implemented Interfaces:
NfsRequest
- Direct Known Subclasses:
NfsAccessRequest, NfsCommitRequest, NfsCreateRequest, NfsFsInfoRequest, NfsFsStatRequest, NfsGetAttrRequest, NfsLinkRequest, NfsLookupRequest, NfsMkdirRequest, NfsMknodRequest, NfsPathconfRequest, NfsReaddirplusRequest, NfsReaddirRequest, NfsReadlinkRequest, NfsReadRequest, NfsRemoveRequest, NfsRenameRequest, NfsRmdirRequest, NfsSetAttrRequest, NfsSymlinkRequest, NfsWriteRequest
The common base class for all requests specified by RFC 1813
(https://tools.ietf.org/html/rfc1813).
-
Field Summary
Fields inherited from class RpcRequest
CHARSET -
Constructor Summary
ConstructorsConstructorDescriptionNfsRequestBase(int serviceProgram, int serviceVersion, int serviceProcedure, Credential credential, byte[] fileHandle) Creates the basic request structure. -
Method Summary
Modifier and TypeMethodDescriptionfinal StringReturns an appropriate error message.final byte[]Returns the primary file handle, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).final byte[]getIpKey()Returns the key, used in determining IP addresses for RPC calls.voidmarshalling(Xdr xdr) Writes the RPC call header and authentication credentials to the XDR buffer.protected final StringBuilderstartToString(String requestlabel) Start a StringBuilder for use in toString() (for logging).Methods inherited from class RpcRequest
cloneFileHandle, isUsePrivilegedPort, setUsePrivilegedPort, trimFileName
-
Constructor Details
-
NfsRequestBase
public NfsRequestBase(int serviceProgram, int serviceVersion, int serviceProcedure, Credential credential, byte[] fileHandle) throws FileNotFoundException Creates the basic request structure.- Parameters:
serviceProgram- The program number of the service.serviceVersion- The version number of the service.serviceProcedure- The service procedure number to be called.credential- The credential.fileHandle- The primary file handle, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- For operations GETATTR, SETATTR, ACCESS, READLINK, READ, WRITE, LINK, READDIR, READDIRPLUS, SSTAT, FSINFO, PATHCONF, and COMMIT, this is the file handle for the object on which the operation will be performed.
- For operations LOOKUP, CREATE, MKDIR, SYMLINK, MKNOD, REMOVE, RMDIR, RENAME, this is the file handle for the directory on which the operation will be performed.
- Throws:
FileNotFoundException
-
-
Method Details
-
getErrorMessage
Returns an appropriate error message.- Specified by:
getErrorMessagein classRpcRequest
-
getFileHandle
public final byte[] getFileHandle()Returns the primary file handle, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).- For operations GETATTR, SETATTR, ACCESS, READLINK, READ, WRITE, LINK, READDIR, READDIRPLUS, SSTAT, FSINFO, PATHCONF, and COMMIT, this is the file handle for the object on which the operation will be performed.
- For operations LOOKUP, CREATE, MKDIR, SYMLINK, MKNOD, REMOVE, RMDIR, RENAME, this is the file handle for the directory on which the operation will be performed.
-
getIpKey
public final byte[] getIpKey()Returns the key, used in determining IP addresses for RPC calls. -
marshalling
Writes the RPC call header and authentication credentials to the XDR buffer.- Specified by:
marshallingin interfaceNfsRequest- Overrides:
marshallingin classRpcRequest- Parameters:
xdr- the Xdr to be sent.
-
startToString
Start a StringBuilder for use in toString() (for logging).- Overrides:
startToStringin classRpcRequest- Returns:
- the builder
-