public abstract class RpcRequest
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.nio.charset.Charset |
CHARSET
The default Internet charset.
|
| Constructor and Description |
|---|
RpcRequest(int serviceProgram,
int serviceVersion,
int serviceProcedure,
Credential credential)
Create the request, as specified by RFC 1831
(https://tools.ietf.org/html/rfc1831).
|
| Modifier and Type | Method and Description |
|---|---|
protected static byte[] |
cloneFileHandle(byte[] fileHandle)
Utility function for cloning file handles.
|
abstract java.lang.String |
getErrorMessage() |
boolean |
isUsePrivilegedPort() |
void |
marshalling(Xdr xdr) |
void |
setUsePrivilegedPort(boolean usePrivilegedPort)
Set the flag.
|
protected java.lang.StringBuilder |
startToString(java.lang.String requestLabel)
Start a StringBuilder for use in toString() (for logging).
|
protected static java.lang.String |
trimFileName(java.lang.String name) |
public static final java.nio.charset.Charset CHARSET
public RpcRequest(int serviceProgram,
int serviceVersion,
int serviceProcedure,
Credential credential)
serviceProgram - The program number of the service.serviceVersion - The version number of the service.serviceProcedure - The service procedure number to be called.credential - The authentication credential to be used for the call.public void marshalling(Xdr xdr)
public boolean isUsePrivilegedPort()
true if the client should use a privileged local
port (below 1024).false if the client should use any available
local port.public void setUsePrivilegedPort(boolean usePrivilegedPort)
usePrivilegedPort - true if the client should use a privileged
local port (below 1024).false if the client should use any available
local port.protected java.lang.StringBuilder startToString(java.lang.String requestLabel)
requestLabel - public abstract java.lang.String getErrorMessage()
protected static final byte[] cloneFileHandle(byte[] fileHandle)
throws java.io.FileNotFoundException
fileHandle - The file handle to clone.fileHandle is not null.java.io.FileNotFoundException - If the file handle is null.protected static final java.lang.String trimFileName(java.lang.String name)
throws java.lang.IllegalArgumentException
name - The file name to trim.java.lang.IllegalArgumentException - If the file name is blank.