Interface PortAutoCloseable
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Subinterfaces:
Channel<Message>
,DoubleChannel
,DoubleReceivePort
,DoubleSendPort
,FloatChannel
,FloatReceivePort
,FloatSendPort
,IntChannel
,IntReceivePort
,IntSendPort
,LongChannel
,LongReceivePort
,LongSendPort
,Mix<M>
,ReceivePort<Message>
,SendPort<Message>
,StandardChannel<Message>
- All Known Implementing Classes:
Actor
,ActorRef
,ActorRefDelegate
,BasicActor
,Behavior
,BehaviorActor
,DelegatingReceivePort
,DelegatingSendPort
,EventSource
,EventSourceActor
,FiniteStateMachineActor
,FlatMappingReceivePort
,Mailbox
,ProxyServerActor
,QueueChannel
,QueueDoubleChannel
,QueueFloatChannel
,QueueIntChannel
,QueueLongChannel
,QueueObjectChannel
,QueuePrimitiveChannel
,ReceivePortGroup
,Server
,ServerActor
,SingleConsumerQueueChannel
,SplitSendPort
,Supervisor
,SupervisorActor
,TickerChannelConsumer
,TickerChannelConsumer.TickerChannelFloatConsumer
,TimeoutChannel
,Topic
,TransferChannel
,TransformingReceivePort
,TransformingSendPort
,ValChannel
,ZippingReceivePort
public interface PortAutoCloseable extends java.lang.AutoCloseable
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
close()
Closes the channel so that no more messages could be sent to it.default boolean
isClosed()
Tests whether the channel has been closed and no more messages await in the channel.
-
-
-
Method Detail
-
close
default void close()
Closes the channel so that no more messages could be sent to it. Messages already sent to the channel will still be received.- Specified by:
close
in interfacejava.lang.AutoCloseable
-
isClosed
default boolean isClosed()
Tests whether the channel has been closed and no more messages await in the channel. If this method returnstrue
all future calls toreceive
are guaranteed to returnnull
, and calls toreceive
on a primitive channel will throw aEOFException
.- Returns:
true
if the channels has been closed and no more messages will be received;false
otherwise.
-
-