Class PmMessageSender
java.lang.Object
com._1c.g5.v8.dt.internal.pm.connection.mmf.PmMessageSender
- All Implemented Interfaces:
Invalidatable
,IpcChannelMessagesSender
,UncaughtExceptionsGenerator
,AutoCloseable
IpcChannelMessagesSender
implementation.
Before send(IpcMessage)
, opposite side PmMessageReceiver
must be created.
-
Constructor Summary
ConstructorsConstructorDescriptionPmMessageSender
(PmTempFilesProvider pmFilesProvider) Constructs new instance with givenPmTempFilesProvider
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
isValid()
Returns if this instance is not closed.void
send
(IpcMessage message) Sends given message to receiver on the other side of channel, waiting until it is received.void
-
Constructor Details
-
PmMessageSender
Constructs new instance with givenPmTempFilesProvider
.- Parameters:
pmFilesProvider
- givenPmTempFilesProvider
(notnull
)- Throws:
IOException
- if construction failed due to I/O exception
-
-
Method Details
-
setUncaughtExceptionHandler
Description copied from interface:UncaughtExceptionsGenerator
- Specified by:
setUncaughtExceptionHandler
in interfaceUncaughtExceptionsGenerator
- Parameters:
handler
- givenThread.UncaughtExceptionHandler
(notnull
)
-
send
Description copied from interface:IpcChannelMessagesSender
Sends given message to receiver on the other side of channel, waiting until it is received.- Specified by:
send
in interfaceIpcChannelMessagesSender
- Parameters:
message
- given message (notnull
)- Throws:
InterruptedException
- if waiting for message receiving interruptedIOException
- if sending message failed
-
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
-
close
Description copied from interface:IpcChannelMessagesSender
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceIpcChannelMessagesSender
- Throws:
IOException
- if operatin failed due to I/O exception
-