Class ExternalEnv
- java.lang.Object
-
- com.perforce.p4java.impl.mapbased.rpc.ExternalEnv
-
- All Implemented Interfaces:
RpcMarshalable
public class ExternalEnv extends java.lang.Object implements RpcMarshalable
Used as a container for each Perforce RPC call's external (operating system, calling program, etc.) environment. Serialized as the first part of most client-side RPC user command calls. Only sent once per user command dispatch loop (as far as is known).
-
-
Constructor Summary
Constructors Constructor Description ExternalEnv(java.lang.String progName, java.lang.String version, java.lang.String client, java.lang.String cwd, java.lang.String host, java.lang.String port, java.lang.String language, java.lang.String os, java.lang.String user, boolean unicode, java.nio.charset.Charset currentCharset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getClient()
java.nio.charset.Charset
getCurrentCharset()
java.lang.String
getCwd()
java.lang.String
getHost()
java.lang.String
getLanguage()
java.lang.String
getOs()
java.lang.String
getPort()
java.lang.String
getProgName()
java.lang.String
getUser()
java.lang.String
getVersion()
boolean
isUnicode()
byte[]
marshal()
void
marshal(java.nio.ByteBuffer buf)
Marshal the associated object onto the passed-in ByteBuffer.void
setClient(java.lang.String client)
void
setCurrentCharset(java.nio.charset.Charset currentCharset)
void
setCwd(java.lang.String cwd)
void
setHost(java.lang.String host)
void
setLanguage(java.lang.String language)
void
setOs(java.lang.String os)
void
setPort(java.lang.String port)
void
setProgName(java.lang.String progName)
void
setUnicode(boolean unicode)
void
setUser(java.lang.String user)
void
setVersion(java.lang.String version)
java.lang.String
toString()
-
-
-
Constructor Detail
-
ExternalEnv
public ExternalEnv(java.lang.String progName, java.lang.String version, java.lang.String client, java.lang.String cwd, java.lang.String host, java.lang.String port, java.lang.String language, java.lang.String os, java.lang.String user, boolean unicode, java.nio.charset.Charset currentCharset)
-
-
Method Detail
-
marshal
public void marshal(java.nio.ByteBuffer buf) throws java.nio.BufferOverflowException
Description copied from interface:RpcMarshalable
Marshal the associated object onto the passed-in ByteBuffer.- Specified by:
marshal
in interfaceRpcMarshalable
- Parameters:
buf
- non-null ByteBuffer; should be big enough to take the marshaled object- Throws:
java.nio.BufferOverflowException
- if the passed-in buffer wasn't big enough
-
marshal
public byte[] marshal()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getProgName
public java.lang.String getProgName()
-
setProgName
public void setProgName(java.lang.String progName)
-
getVersion
public java.lang.String getVersion()
-
setVersion
public void setVersion(java.lang.String version)
-
getClient
public java.lang.String getClient()
-
setClient
public void setClient(java.lang.String client)
-
getCwd
public java.lang.String getCwd()
-
setCwd
public void setCwd(java.lang.String cwd)
-
getHost
public java.lang.String getHost()
-
setHost
public void setHost(java.lang.String host)
-
getPort
public java.lang.String getPort()
-
setPort
public void setPort(java.lang.String port)
-
getLanguage
public java.lang.String getLanguage()
-
setLanguage
public void setLanguage(java.lang.String language)
-
getOs
public java.lang.String getOs()
-
setOs
public void setOs(java.lang.String os)
-
getUser
public java.lang.String getUser()
-
setUser
public void setUser(java.lang.String user)
-
isUnicode
public boolean isUnicode()
-
setUnicode
public void setUnicode(boolean unicode)
-
getCurrentCharset
public java.nio.charset.Charset getCurrentCharset()
-
setCurrentCharset
public void setCurrentCharset(java.nio.charset.Charset currentCharset)
-
-