Class NfsResponseBase

java.lang.Object
com.emc.ecs.nfsclient.rpc.RpcResponse
com.emc.ecs.nfsclient.nfs.NfsResponseBase
Direct Known Subclasses:
NfsAccessResponse, NfsCommitResponse, NfsCreateResponse, NfsFsInfoResponse, NfsFsStatResponse, NfsGetAttrResponse, NfsLinkResponse, NfsLookupResponse, NfsMkdirResponse, NfsMknodResponse, NfsPathconfResponse, NfsReaddirplusResponse, NfsReaddirResponse, NfsReadlinkResponse, NfsReadResponse, NfsRemoveResponse, NfsRenameResponse, NfsRmdirResponse, NfsSetAttrResponse, NfsSymlinkResponse, NfsWriteResponse

public abstract class NfsResponseBase extends RpcResponse
The base class for all NFS responses specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).
  • Constructor Details

    • NfsResponseBase

      public NfsResponseBase()
      Create the base class object.
  • Method Details

    • unmarshalling

      public void unmarshalling(Xdr xdr) throws RpcException
      Load this structure from the response data, as specified by RFC 1831 (https://tools.ietf.org/html/rfc1831).
      Overrides:
      unmarshalling in class RpcResponse
      Parameters:
      xdr - The xdr response data.
      Throws:
      RpcException
    • getState

      public int getState()
      Returns the state returned in the response. For details, see RFC 1813 (https://tools.ietf.org/html/rfc1813).
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getAttributes

      public final NfsGetAttributes getAttributes()
      Returns file system object post-operation attributes. These are provided for many calls. For information on the object to which the attributes refer, or for other details, see RFC 1813 (https://tools.ietf.org/html/rfc1813).
    • getFileHandle

      public final byte[] getFileHandle()
      Returns the file handle for the system object that was created for a successful CREATE, MKDIR, MKNOD, or SYMLINK request, or looked up for a LOOKUP request. This is null for all other requests, and also for failed requests.
    • stateIsOk

      public boolean stateIsOk()
      Check the state returned in the response. For details, see RFC 1813 (https://tools.ietf.org/html/rfc1813).
      Returns:
      true if the state is NFS3_OK, false otherwise
    • unmarshallingAttributes

      protected void unmarshallingAttributes(Xdr xdr)
      Unmarshall the object if it is there. Convenience method for use in subclasses.
    • unmarshallingAttributes

      protected void unmarshallingAttributes(Xdr xdr, boolean force)
      Unmarshall the object if it is there, or skip the existence check if force is true. Convenience method for use in subclasses.
      Parameters:
      force - do not check whether it is there
    • unmarshallingFileHandle

      protected void unmarshallingFileHandle(Xdr xdr)
      Unmarshall the object if it is there. Convenience method for use in subclasses.
    • unmarshallingFileHandle

      protected void unmarshallingFileHandle(Xdr xdr, boolean force)
      Unmarshall the object if it is there, or skip the existence check if force is true. Convenience method for use in subclasses.
    • makeNfsGetAttributes

      protected static NfsGetAttributes makeNfsGetAttributes(Xdr xdr)
      Create the object if it is there, return null if it is not. Convenience method for use in subclasses.
      Returns:
      the created object or null
    • makeNfsGetAttributes

      protected static NfsGetAttributes makeNfsGetAttributes(Xdr xdr, boolean force)
      Create the object if it is there, or skip the existence check if force is true. Convenience method for use in subclasses.
      Parameters:
      force - do not check whether it is there
      Returns:
      the created object