Interface IProcessConnection
- All Superinterfaces:
AutoCloseable
,IConnection
,Invalidatable
,UncaughtExceptionsGenerator
- All Known Subinterfaces:
IProcessConnectionDelegate
- All Known Implementing Classes:
MmfProcessConnection
,ProcessConnectionDelegateImpl
,RmiProcessConnectionStub
Represents a connection with process.
A IProcessConnection
instance used by the host process is a stub to IProcessConnectionDelegate
running
within a separate process.
-
Method Summary
Modifier and TypeMethodDescriptioncreateInstanceConnection
(Class<? extends T> clazz, String... libraries) Creates an instance of given of given class within a process and returns a connection with that instance.void
Starts a connection if it is not already started.Methods inherited from interface com._1c.g5.v8.dt.internal.pm.connection.IConnection
close
Methods inherited from interface com._1c.g5.v8.dt.internal.pm.ipc.sync.Invalidatable
isValid
Methods inherited from interface com._1c.g5.v8.dt.internal.pm.ipc.sync.UncaughtExceptionsGenerator
setUncaughtExceptionHandler
-
Method Details
-
createInstanceConnection
<T> IInstanceConnection createInstanceConnection(Class<? extends T> clazz, String... libraries) throws IOException, InstantiationException, IllegalAccessException Creates an instance of given of given class within a process and returns a connection with that instance.- Parameters:
clazz
- given class (notnull
)libraries
- given libraries to load before creating instance (notnull
)- Returns:
- connection with created instance of given class (not
null
) - Throws:
IOException
- if connection with process failsInstantiationException
- if the implementation represents an abstract class, an interface, an array class, a primitive type, or void; or if the class has no nullary constructor; or if the instantiation fails for some other reasonIllegalAccessException
- if could not instantiate the implementation by it's default constructor (for instance, if the default constructor is unaccessible)
-
startIfNotStarted
void startIfNotStarted()Starts a connection if it is not already started.
-