Class RmiProcessLauncher
java.lang.Object
com._1c.g5.v8.dt.internal.pm.connection.rmi.RmiProcessLauncher
- All Implemented Interfaces:
IProcessLauncher
IProcessLauncher
for connection with process via RMI.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
A name of Host address field for dependency injection. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String[]
Returns args for process with given key.protected int
getPort()
Obtain an empty port at the local machine to start an RMI registry on itprotected void
Initializes RMI if it has not been already initialized.launchProcess
(ProcessBinder processBinder, IProcessConnectionListener listener) Launches process with parameters specified in givenProcessBinder
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com._1c.g5.v8.dt.internal.pm.connection.IProcessLauncher
clean
-
Field Details
-
HOST_ADDRESS
A name of Host address field for dependency injection.- See Also:
-
-
Constructor Details
-
RmiProcessLauncher
public RmiProcessLauncher()
-
-
Method Details
-
launchProcess
public Process launchProcess(ProcessBinder processBinder, IProcessConnectionListener listener) throws IOException Description copied from interface:IProcessLauncher
Launches process with parameters specified in givenProcessBinder
. Starts establishing connection with lauhced process. Established connection is provided to givenIProcessConnectionListener
during or after this method invocation.- Specified by:
launchProcess
in interfaceIProcessLauncher
- Parameters:
processBinder
- givenProcessBinder
(notnull
)listener
- givenIProcessConnectionListener
, to which established connection is provided during or after this method invocation (notnull
)- Returns:
- lauched process. When connection is closed, must be killed (not
null
) - Throws:
IOException
- if launching process failed
-
initializeRmi
Initializes RMI if it has not been already initialized.
- Throws:
RemoteException
- if exportingprocessRegister
or RMI binding fails
-
getPort
protected int getPort()Obtain an empty port at the local machine to start an RMI registry on it
- Returns:
- an empty port at the local machine
- Throws:
PortAllocatingException
- when operation fails
-
getArgs
Returns args for process with given key.- Parameters:
key
- given key (notnull
)- Returns:
- args for process with given key (not
null
)
-