Class PmMessageReceiver
java.lang.Object
com._1c.g5.v8.dt.internal.pm.connection.mmf.PmMessageReceiver
- All Implemented Interfaces:
Invalidatable
,IpcChannelMessagesReceiver
,UncaughtExceptionsGenerator
,AutoCloseable
IpcChannelMessagesReceiver
implementation.
Before nextMessage()
, opposite side PmMessageSender
must be created.
-
Constructor Summary
ConstructorsConstructorDescriptionPmMessageReceiver
(PmTempFilesProvider pmFilesProvider) Constructs new instance with givenPmTempFilesProvider
. -
Method Summary
-
Constructor Details
-
PmMessageReceiver
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
)
-
nextMessage
Description copied from interface:IpcChannelMessagesReceiver
Waits for the next message sent by the other side to this channel and returns obtained message.- Specified by:
nextMessage
in interfaceIpcChannelMessagesReceiver
- Returns:
- message sent by the other side to this channel (not
null
) - Throws:
InterruptedException
- if waiting for message interruptedIOException
- if reading 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:IpcChannelMessagesReceiver
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceIpcChannelMessagesReceiver
- Throws:
IOException
- if operation failed due to I/O exception
-