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

public abstract class NfsRequestBase extends RpcRequest implements NfsRequest
The common base class for all requests specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).
  • 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

      public final String getErrorMessage()
      Returns an appropriate error message.
      Specified by:
      getErrorMessage in class RpcRequest
    • 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

      public void marshalling(Xdr xdr)
      Writes the RPC call header and authentication credentials to the XDR buffer.
      Specified by:
      marshalling in interface NfsRequest
      Overrides:
      marshalling in class RpcRequest
      Parameters:
      xdr - the Xdr to be sent.
    • startToString

      protected final StringBuilder startToString(String requestlabel)
      Start a StringBuilder for use in toString() (for logging).
      Overrides:
      startToString in class RpcRequest
      Returns:
      the builder