Package com.adobe.versioncue.nativecomm
Interface IServiceBuilder
-
public interface IServiceBuilder
- Since:
- Mar 8, 2006
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String[]
arguments()
Returns the arguments to be passed to the native process.IServiceBuilder
arguments(java.lang.String[] args)
Sets the arguments to be passed to the native process.java.lang.String
command()
Returns the native executable to launch.IServiceBuilder
command(java.io.File command)
Sets the native executable to launch.IServiceBuilder
command(java.lang.String command)
Sets the native executable to launch.int
connectionsPerProcess()
Returns the number of connections established per process.IServiceBuilder
connectionsPerProcess(int connectionsPerProcess)
Sets the number of connections established per process.INativeService
create()
Creates and returns an INativeService object.int
debugPort()
Returns TCP port to listen on for debug connection.IServiceBuilder
debugPort(int port)
Sets the TCP port to listen on for debug connection.java.io.File
directory()
Returns the working directory of the native process.IServiceBuilder
directory(java.io.File directory)
Sets the working directory of the native process.java.util.Map<java.lang.String,java.lang.String>
environment()
Returns a rereference to this ServiceBuilders environment map.java.lang.String
id()
Returns the unique id of the NativeService.IServiceBuilder
id(java.lang.String id)
Sets the unique id of the NativeService.int
launchTimeout()
Maximum time to wait for a spawned child process' connection.IServiceBuilder
launchTimeout(int timeout)
Sets the maximum time to wait for a spawned child process' connection.java.lang.String
library()
Returns the path of the NativeService library to load.IServiceBuilder
library(java.io.File library)
Sets the path of the NativeService library to load.IServiceBuilder
library(java.lang.String library)
Sets the path of the NativeService library to load.java.io.File
logDir()
Returns the service log directory.IServiceBuilder
logDir(java.io.File logdir)
Sets the service log directory.java.lang.String
loggerName()
Returns the Logger name (i.e.IServiceBuilder
loggerName(java.lang.String loggerName)
Logger name (i.e.int
maxConnections()
Returns the maximum connection pool sizeIServiceBuilder
maxConnections(int maxConnections)
Sets the maximum connection pool sizeint
maxRequests()
Returns the maximum number of requests per process.IServiceBuilder
maxRequests(int maxRequests)
Sets the maximum number of requests per process.IProcessLauncherHook
processLauncherHook()
Returns theIProcessLauncherHook
.IServiceBuilder
processLauncherHook(IProcessLauncherHook hook)
Set theIProcessLauncherHook
instance or null.int
terminationTimeout()
Maximum time to wait for a spawned child process' graceful termination.IServiceBuilder
terminationTimeout(int timeout)
Sets the maximum time to wait for a spawned child process' graceful termination.java.io.File
tmpDir()
Returns the service temp directory.IServiceBuilder
tmpDir(java.io.File tmpDir)
Sets the service temp directory.
-
-
-
Method Detail
-
create
INativeService create() throws NativeCommException
Creates and returns an INativeService object.- Returns:
- INativeService object
- Throws:
NativeCommException
- on failure
-
id
java.lang.String id()
Returns the unique id of the NativeService.- Returns:
- unique id of the NativeService
-
id
IServiceBuilder id(java.lang.String id)
Sets the unique id of the NativeService.- Parameters:
id
- unique id to set- Returns:
- the IServiceBuilder
-
maxConnections
int maxConnections()
Returns the maximum connection pool size- Returns:
- the maximum connection pool size
-
maxConnections
IServiceBuilder maxConnections(int maxConnections)
Sets the maximum connection pool size- Parameters:
maxConnections
- maximum connection pool size- Returns:
- the IServiceBuilder
-
maxRequests
int maxRequests()
Returns the maximum number of requests per process.- Returns:
- the maximum number of requests per process (0 == unlimited)
-
maxRequests
IServiceBuilder maxRequests(int maxRequests)
Sets the maximum number of requests per process.- Parameters:
maxRequests
- maximum number of requests per process (0 == unlimited)- Returns:
- the IServiceBuilder
-
arguments
java.lang.String[] arguments()
Returns the arguments to be passed to the native process.- Returns:
- arguments to be passed to the native process.
-
arguments
IServiceBuilder arguments(java.lang.String[] args)
Sets the arguments to be passed to the native process.- Parameters:
args
- to be passed to the native process- Returns:
- the IServiceBuilder
-
environment
java.util.Map<java.lang.String,java.lang.String> environment()
Returns a rereference to this ServiceBuilders environment map. Key/value pairs added to the returned map a passed to the native process via environment variables.- Returns:
- reference to this ServiceConfigs environment map
-
library
java.lang.String library()
Returns the path of the NativeService library to load.- Returns:
- path of the NativeService library to load.
-
library
IServiceBuilder library(java.lang.String library)
Sets the path of the NativeService library to load.- Parameters:
library
- path of the NativeService library to load- Returns:
- the IServiceBuilder
-
library
IServiceBuilder library(java.io.File library)
Sets the path of the NativeService library to load.- Parameters:
library
- path of the NativeService library to load- Returns:
- the ServiceBuilder
-
directory
java.io.File directory()
Returns the working directory of the native process.- Returns:
- the working directory of the native process; null if default is used)
-
directory
IServiceBuilder directory(java.io.File directory)
Sets the working directory of the native process.- Parameters:
directory
- working directory of the native process; if null, the parent directory of the library is used- Returns:
- the IServiceBuilder
-
command
java.lang.String command()
Returns the native executable to launch.- Returns:
- the native executable to launch; if null, the default NativeComm host is used
-
command
IServiceBuilder command(java.lang.String command)
Sets the native executable to launch.- Parameters:
command
- native executable to launch; if null, the default NativeComm host is used- Returns:
- the IServiceBuilder
-
command
IServiceBuilder command(java.io.File command)
Sets the native executable to launch.- Parameters:
command
- native executable to launch; if null, the default NativeComm host is used- Returns:
- the IServiceBuilder
-
connectionsPerProcess
int connectionsPerProcess()
Returns the number of connections established per process.- Returns:
- number of connections established per process
-
connectionsPerProcess
IServiceBuilder connectionsPerProcess(int connectionsPerProcess)
Sets the number of connections established per process.- Parameters:
connectionsPerProcess
- number of connections established per process- Returns:
- the IServiceBuilder
-
logDir
java.io.File logDir()
Returns the service log directory.- Returns:
- the service log directory; if null the working directory is used
-
logDir
IServiceBuilder logDir(java.io.File logdir)
Sets the service log directory.- Parameters:
logdir
- the service log directory; if null the working directory is used- Returns:
- the IServiceBuilder
-
tmpDir
java.io.File tmpDir()
Returns the service temp directory.- Returns:
- the service temp directory; if null the default temp path is inherited
-
tmpDir
IServiceBuilder tmpDir(java.io.File tmpDir)
Sets the service temp directory.- Parameters:
tmpDir
- the service temp directory; if null the default temp path is inherited- Returns:
- the IServiceBuilder
-
launchTimeout
int launchTimeout()
Maximum time to wait for a spawned child process' connection. If a spawned child process fails to connect to the parent within the specified maximum timespan, it is forcefully killed and the launch is considered failed.- Returns:
- maximum time to wait for a spawned child process' connection.
-
launchTimeout
IServiceBuilder launchTimeout(int timeout)
Sets the maximum time to wait for a spawned child process' connection.- Parameters:
timeout
- maximum time to wait for a spawned child process' connection.- Returns:
- the IServiceBuilder
- See Also:
launchTimeout()
-
terminationTimeout
int terminationTimeout()
Maximum time to wait for a spawned child process' graceful termination. If a spawned child process fails to quit within the specified maximum timespan after its' connections to the parent are closed, it is forcefully killed.- Returns:
- maximum time to wait for a spawned child process' graceful termination.
-
terminationTimeout
IServiceBuilder terminationTimeout(int timeout)
Sets the maximum time to wait for a spawned child process' graceful termination.- Parameters:
timeout
- maximum time to wait for a spawned child process' graceful termination.- Returns:
- the IServiceBuilder
- See Also:
terminationTimeout()
-
debugPort
int debugPort()
Returns TCP port to listen on for debug connection.- Returns:
- TCP port to listen on for debug connection; 0 if not debugging
-
debugPort
IServiceBuilder debugPort(int port)
Sets the TCP port to listen on for debug connection.- Parameters:
port
- TCP port to listen on for debug connection; 0 if not debugging- Returns:
- the IServiceBuilder
-
loggerName
IServiceBuilder loggerName(java.lang.String loggerName)
Logger name (i.e. class name of NComm service user). Set this to activate log streaming from native processes to java side (unified log).- Parameters:
loggerName
- - logger name (i.e. class name of NComm service user).- Returns:
- the IServiceBuilder
-
loggerName
java.lang.String loggerName()
Returns the Logger name (i.e. class name of NComm service user).- Returns:
- the Logger name
-
processLauncherHook
IProcessLauncherHook processLauncherHook()
Returns theIProcessLauncherHook
.- Returns:
- the
IProcessLauncherHook
.
-
processLauncherHook
IServiceBuilder processLauncherHook(IProcessLauncherHook hook)
Set theIProcessLauncherHook
instance or null.- Parameters:
hook
- -IProcessLauncherHook
instance or null.- Returns:
- the IServiceBuilder
-
-