Class RmiInstanceConnectionStub
java.lang.Object
com._1c.g5.v8.dt.internal.pm.connection.rmi.RmiInstanceConnectionStub
- All Implemented Interfaces:
IConnection
,IInstanceConnection
,Invalidatable
,UncaughtExceptionsGenerator
,AutoCloseable
Host - side stub implementation of
IInstanceConnection
.-
Constructor Summary
ConstructorsConstructorDescriptionRmiInstanceConnectionStub
(IRemoteInvoker remoteInvoker) Constructs new instance with givenIRemoteInvoker
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
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.void
-
Constructor Details
-
RmiInstanceConnectionStub
Constructs new instance with givenIRemoteInvoker
.- Parameters:
remoteInvoker
- givenIRemoteInvoker
(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
-
invokeMethod
public Object invokeMethod(String methodName, Class<?>[] parameterTypes, Object[] parameters) throws IOException, 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
- Parameters:
methodName
- given method name (notnull
)parameterTypes
- given parameter types (notnull
)parameters
- given parameters (notnull
)- Returns:
- invocation result (may be
null
) - Throws:
IOException
- if connection brokenReflectiveOperationException
- if metod execution fails due to reflective error
-
dispose
Description copied from interface:IInstanceConnection
Disposes this instance and closes connection with it.- Specified by:
dispose
in interfaceIInstanceConnection
- Throws:
IOException
-
setUncaughtExceptionHandler
SetsThread.UncaughtExceptionHandler
. Always throwsUnsupportedOperationException
.- Specified by:
setUncaughtExceptionHandler
in interfaceUncaughtExceptionsGenerator
- Parameters:
handler
- givenThread.UncaughtExceptionHandler
(notnull
)
-
close
public void close()Description copied from interface:IConnection
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceIConnection
-