public abstract class ClientBuilderOptions
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
accountIds
All the subject IDs associated with this builder or
null to use the
context's subject IDs. |
private java.util.List<java.lang.String> |
bootstrapConfig
P2J client bootstrap config
|
private java.lang.String |
classPath
Class path.
|
private java.lang.String |
command
Java launcher executable name.
|
private java.lang.String |
configFile
Client configuration file.
|
private static java.lang.String |
defaultPath
Runtime calculated path to our main jar file.
|
private static java.lang.String |
DIRECTORY_NODE_ID
Directory node name.
|
private java.util.List<java.lang.String> |
jvmArguments
JVM arguments.
|
private java.lang.String |
libPath
Native library path.
|
private static java.util.logging.Logger |
LOG
Logger.
|
private static java.lang.Class<?> |
mainClass
Main class, must have a main method
|
private boolean |
secure
Secure socket flag.
|
private java.lang.String |
spawner
Spawner executable name.
|
private java.lang.String |
workingDirectory
User's working directory.
|
Modifier | Constructor and Description |
---|---|
protected |
ClientBuilderOptions(ClientBuilderOptions copy,
java.lang.String[] accountIds)
Initialize by reading all configuration parameters from a previously created instance.
|
protected |
ClientBuilderOptions(java.lang.String[] accountIds)
Initialize.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getBootstrapConfig()
Get P2J client's bootstrap config.
|
java.lang.String |
getClassPath()
Get classpath
|
java.lang.String |
getCommand()
Get command
|
java.lang.String |
getConfigFile()
Get configuration file name.
|
private static java.lang.String |
getDefaultPath()
Get default path as the p2j.jar file location.
|
java.util.List<java.lang.String> |
getJvmArguments()
Get JVM arguments
|
java.lang.String |
getLibPath()
Get native library path.
|
java.lang.Class<?> |
getMainClass()
Get the Java process main class.
|
protected boolean |
getNode(java.lang.String parent,
java.lang.String node,
boolean defa)
Get a boolean value from a directory node.
|
protected int |
getNode(java.lang.String parent,
java.lang.String node,
int defa)
Get an integer value from a directory node.
|
protected java.lang.String |
getNode(java.lang.String parent,
java.lang.String node,
java.lang.String defa)
Get a string value from a directory node.
|
java.lang.String |
getSpawner()
Get spawner command.
|
java.lang.String |
getWorkingDirectory()
Get user working directory.
|
private void |
initialize()
Read the configuration from the directory and calculate certain runtime values that will
be used by all client launching.
|
protected abstract boolean |
isPasswordAuthentication()
Get the authentication mode for this spawner.
|
boolean |
isSecure()
Get the security mode.
|
protected static java.lang.String |
quotedString(java.lang.String text)
When the string contains space characters a quoted string is build.
|
private static final java.util.logging.Logger LOG
private static final java.lang.String DIRECTORY_NODE_ID
private static final java.lang.Class<?> mainClass
private static final java.lang.String defaultPath
private boolean secure
private java.lang.String command
private java.lang.String workingDirectory
private java.lang.String classPath
private java.lang.String libPath
private java.lang.String spawner
private java.lang.String configFile
private java.util.List<java.lang.String> jvmArguments
private java.util.List<java.lang.String> bootstrapConfig
protected final java.lang.String[] accountIds
null
to use the
context's subject IDs.protected ClientBuilderOptions(java.lang.String[] accountIds)
accountIds
- All the subject IDs associated with this builder or null
to use the
context's subject IDs.protected ClientBuilderOptions(ClientBuilderOptions copy, java.lang.String[] accountIds)
copy
- The instance from which to initialize.accountIds
- All the subject IDs associated with this builder or null
to use the
context's subject IDs.protected abstract boolean isPasswordAuthentication()
true
indicating that the user's password is required for authentication.public boolean isSecure()
true
use a secured connection false
otherwise.public java.lang.String getCommand()
public java.lang.String getClassPath()
public java.lang.String getLibPath()
public java.lang.String getWorkingDirectory()
public java.lang.String getConfigFile()
public java.util.List<java.lang.String> getJvmArguments()
public java.util.List<java.lang.String> getBootstrapConfig()
public java.lang.String getSpawner()
public java.lang.Class<?> getMainClass()
protected static java.lang.String quotedString(java.lang.String text)
text
- Text to search for spaces.protected java.lang.String getNode(java.lang.String parent, java.lang.String node, java.lang.String defa)
parent
- The name of the parent node.node
- Node name.defa
- Default value if node not found.protected int getNode(java.lang.String parent, java.lang.String node, int defa)
parent
- The name of the parent node.node
- Node name.defa
- Default value if node not found.protected boolean getNode(java.lang.String parent, java.lang.String node, boolean defa)
parent
- The name of the parent node.node
- Node name.defa
- Default value if node not found.private static java.lang.String getDefaultPath()
private void initialize()