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
The base class for all NFS responses specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).
-
Field Summary
Fields inherited from class RpcResponse
_xid -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal NfsGetAttributesReturns file system object post-operation attributes.final byte[]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.intgetState()Returns the state returned in the response.protected static NfsGetAttributesmakeNfsGetAttributes(Xdr xdr) Create the object if it is there, return null if it is not.protected static NfsGetAttributesmakeNfsGetAttributes(Xdr xdr, boolean force) Create the object if it is there, or skip the existence check ifforceistrue.booleanCheck the state returned in the response.toString()voidunmarshalling(Xdr xdr) Load this structure from the response data, as specified by RFC 1831 (https://tools.ietf.org/html/rfc1831).protected voidUnmarshall the object if it is there.protected voidunmarshallingAttributes(Xdr xdr, boolean force) Unmarshall the object if it is there, or skip the existence check ifforceistrue.protected voidUnmarshall the object if it is there.protected voidunmarshallingFileHandle(Xdr xdr, boolean force) Unmarshall the object if it is there, or skip the existence check ifforceistrue.Methods inherited from class RpcResponse
getAcceptStatus, getDirection, getRejectStatus, getReplyStatus, getXid
-
Constructor Details
-
NfsResponseBase
public NfsResponseBase()Create the base class object.
-
-
Method Details
-
unmarshalling
Load this structure from the response data, as specified by RFC 1831 (https://tools.ietf.org/html/rfc1831).- Overrides:
unmarshallingin classRpcResponse- 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
-
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
Unmarshall the object if it is there. Convenience method for use in subclasses. -
unmarshallingAttributes
Unmarshall the object if it is there, or skip the existence check ifforceistrue. Convenience method for use in subclasses.- Parameters:
force- do not check whether it is there
-
unmarshallingFileHandle
Unmarshall the object if it is there. Convenience method for use in subclasses. -
unmarshallingFileHandle
Unmarshall the object if it is there, or skip the existence check ifforceistrue. Convenience method for use in subclasses. -
makeNfsGetAttributes
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
Create the object if it is there, or skip the existence check ifforceistrue. Convenience method for use in subclasses.- Parameters:
force- do not check whether it is there- Returns:
- the created object
-