Class MmfProcessConnection
java.lang.Object
com._1c.g5.v8.dt.internal.pm.ipc.sync.IpcConnection
com._1c.g5.v8.dt.internal.pm.connection.mmf.MmfProcessConnection
- All Implemented Interfaces:
IConnection
,IProcessConnection
,Invalidatable
,UncaughtExceptionsGenerator
,AutoCloseable
A
process connection
, using Memory - Mapped files.-
Field Summary
Fields inherited from class com._1c.g5.v8.dt.internal.pm.ipc.sync.IpcConnection
objectSender, requestSender
-
Constructor Summary
ConstructorsConstructorDescriptionMmfProcessConnection
(IpcChannelMessagesSender messagesSender, IpcChannelMessagesReceiver messagesReceiver) Constructs new instance with givenIpcChannelMessagesSender
andIpcChannelMessagesReceiver
.MmfProcessConnection
(SerializableObjectSender objectSender, IpcChannelMessagesReceiver messagesReceiver) Constructs new instance with givenSerializableObjectSender
andIpcChannelMessagesReceiver
. -
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.Methods inherited from class com._1c.g5.v8.dt.internal.pm.ipc.sync.IpcConnection
close, isValid, setRequestProcessor, setResponseProcessor, setUncaughtExceptionHandler, startIfNotStarted
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.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.connection.IProcessConnection
startIfNotStarted
Methods inherited from interface com._1c.g5.v8.dt.internal.pm.ipc.sync.UncaughtExceptionsGenerator
setUncaughtExceptionHandler
-
Constructor Details
-
MmfProcessConnection
public MmfProcessConnection(SerializableObjectSender objectSender, IpcChannelMessagesReceiver messagesReceiver) Constructs new instance with givenSerializableObjectSender
andIpcChannelMessagesReceiver
.- Parameters:
objectSender
- givenSerializableObjectSender
(notnull
)messagesReceiver
- givenIpcChannelMessagesReceiver
(notnull
)
-
MmfProcessConnection
public MmfProcessConnection(IpcChannelMessagesSender messagesSender, IpcChannelMessagesReceiver messagesReceiver) Constructs new instance with givenIpcChannelMessagesSender
andIpcChannelMessagesReceiver
.- Parameters:
messagesSender
- givenIpcChannelMessagesSender
(notnull
)messagesReceiver
- given {@link {@link IpcChannelMessagesReceiver} (notnull
)
-
-
Method Details
-
createInstanceConnection
public <T> IInstanceConnection createInstanceConnection(Class<? extends T> clazz, String... libraries) throws IOException, InstantiationException, IllegalAccessException, RequestProcessingException, IllegalResponseException 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:
RequestProcessingException
- if exception thrown while processingCreateInstanceRequest
IllegalResponseException
- if response forCreateInstanceRequest
is illegalIOException
- 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)
-