Class RmiProcessConnectionStub
java.lang.Object
com._1c.g5.v8.dt.internal.pm.connection.rmi.RmiProcessConnectionStub
- All Implemented Interfaces:
IConnection
,IProcessConnection
,Invalidatable
,UncaughtExceptionsGenerator
,AutoCloseable
Host - side stub implementation of
IProcessConnection
.-
Constructor Summary
ConstructorsConstructorDescriptionRmiProcessConnectionStub
(IRemoteInvokerProvider remoteInvokerProvider, String processKey) Constructs new instance with givenIRemoteInvokerProvider
and process key. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
createInstanceConnection
(Class<? extends T> clazz, String... libraries) Creates an instance of given of given class within a process and returns a connection with that instance.boolean
isValid()
Returns if this instance is not closed.void
void
Starts a connection if it is not already started.
-
Constructor Details
-
RmiProcessConnectionStub
Constructs new instance with givenIRemoteInvokerProvider
and process key.- Parameters:
remoteInvokerProvider
- givenIRemoteInvokerProvider
(notnull
)processKey
- given process key (notnull
)
-
-
Method Details
-
isValid
public boolean isValid()Description copied from interface:Invalidatable
Returns if this instance is not closed.- Specified by:
isValid
in interfaceInvalidatable
- Returns:
true
, ifAutoCloseable.close()
was not called,false
otherwise
-
createInstanceConnection
public <T> IInstanceConnection createInstanceConnection(Class<? extends T> clazz, String... libraries) throws IOException, InstantiationException, IllegalAccessException Description copied from interface:IProcessConnection
Creates an instance of given of given class within a process and returns a connection with that instance.- Specified by:
createInstanceConnection
in interfaceIProcessConnection
- 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)
-
setUncaughtExceptionHandler
SetsThread.UncaughtExceptionHandler
. Always throwsUnsupportedOperationException
.- Specified by:
setUncaughtExceptionHandler
in interfaceUncaughtExceptionsGenerator
- Parameters:
handler
- givenThread.UncaughtExceptionHandler
(notnull
)
-
startIfNotStarted
public void startIfNotStarted()Description copied from interface:IProcessConnection
Starts a connection if it is not already started.- Specified by:
startIfNotStarted
in interfaceIProcessConnection
-
close
public void close()Description copied from interface:IConnection
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceIConnection
-