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 voidclose()Closes the channel so that no more messages could be sent to it.default booleanisClosed()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:
closein 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 returnstrueall future calls toreceiveare guaranteed to returnnull, and calls toreceiveon a primitive channel will throw aEOFException.- Returns:
trueif the channels has been closed and no more messages will be received;falseotherwise.
-
-