Class MmfInstanceConnection
java.lang.Object
com._1c.g5.v8.dt.internal.pm.connection.mmf.MmfInstanceConnection
- All Implemented Interfaces:
IConnection
,IInstanceConnection
,Invalidatable
,UncaughtExceptionsGenerator
,AutoCloseable
instance connection
, which uses Memory - mapped file.-
Constructor Summary
ConstructorsConstructorDescriptionMmfInstanceConnection
(IConnection parentConnection, RequestSender requestSender, UUID instanceUuid) -
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
-
MmfInstanceConnection
public MmfInstanceConnection(IConnection parentConnection, RequestSender requestSender, UUID instanceUuid) - Parameters:
parentConnection
- given parentIConnection
(notnull
)requestSender
- givenRequestSender
(notnull
)instanceUuid
- givenUUID
of instance (notnull
)
-
-
Method Details
-
invokeMethod
public Object invokeMethod(String methodName, Class<?>[] parameterTypes, Object[] parameters) throws IOException, ReflectiveOperationException, RequestProcessingException, IllegalResponseException 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:
RequestProcessingException
- if exception thrown while processingInvokeMethodRequest
IllegalResponseException
- if response forInvokeMethodRequest
is illegalIOException
- 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
Description copied from interface:IConnection
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceIConnection
- Throws:
IOException
- if operatin failed due to I/O exception
-
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
-