Class InstanceConnectionDelegateImpl
java.lang.Object
com._1c.g5.v8.dt.internal.pm.process.impl.InstanceConnectionDelegateImpl
- All Implemented Interfaces:
IConnection
,IInstanceConnection
,Invalidatable
,UncaughtExceptionsGenerator
,IInstanceConnectionDelegate
,AutoCloseable
Implementation of
IInstanceConnection
running within separate process.-
Constructor Summary
ConstructorsConstructorDescriptionInstanceConnectionDelegateImpl
(Object instance) ConstructsInstanceConnectionDelegateImpl
with given instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Disposes this instance and closes connection with it.invokeMethod
(String methodName, Class<?>[] parameterTypes, Object[] parameters) Invokes method with given name and parameters types on instance with given parameters and returns it's result.boolean
isValid()
Returns if this instance is not closed.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.process.IInstanceConnectionDelegate
close, setUncaughtExceptionHandler
-
Constructor Details
-
InstanceConnectionDelegateImpl
ConstructsInstanceConnectionDelegateImpl
with given instance.- Parameters:
instance
- given instance (notnull
)
-
-
Method Details
-
dispose
Description copied from interface:IInstanceConnection
Disposes this instance and closes connection with it.- Specified by:
dispose
in interfaceIInstanceConnection
- Throws:
IOException
-
isValid
public boolean isValid()Description copied from interface:Invalidatable
Returns if this instance is not closed.- Specified by:
isValid
in interfaceIInstanceConnectionDelegate
- Specified by:
isValid
in interfaceInvalidatable
- Returns:
true
, ifAutoCloseable.close()
was not called,false
otherwise
-
invokeMethod
public Object invokeMethod(String methodName, Class<?>[] parameterTypes, Object[] parameters) throws ReflectiveOperationException Description copied from interface:IInstanceConnection
Invokes method with given name and parameters types on instance with given parameters and returns it's result.- Specified by:
invokeMethod
in interfaceIInstanceConnection
- Specified by:
invokeMethod
in interfaceIInstanceConnectionDelegate
- Parameters:
methodName
- given method name (notnull
)parameterTypes
- given parameter types (notnull
)parameters
- given parameters (notnull
)- Returns:
- invocation result (may be
null
) - Throws:
ReflectiveOperationException
- if metod execution fails due to reflective error
-