org.refcodes.component.Closable, org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.ClosedAccessor, org.refcodes.component.ConnectableComponent, org.refcodes.component.ConnectableComponent.ConnectableAutomaton, org.refcodes.component.ConnectionComponent<LoopbackByteSender>, org.refcodes.component.ConnectionComponent.ConnectionAutomaton<LoopbackByteSender>, org.refcodes.component.ConnectionOpenable<LoopbackByteSender>, org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<LoopbackByteSender>, org.refcodes.component.ConnectionStatusAccessor, org.refcodes.component.OpenedAccessor, ByteBlockProvider, ByteBlockReceiver, ByteDatagramProvider, ByteDatagramReceiver, ByteProvider, ByteReceiver, ConnectionByteReceiver<LoopbackByteSender>, LoopbackByteReceiver, Receivable, org.refcodes.mixin.Releaseablepublic class LoopbackByteReceiverImpl extends AbstractByteReceiver implements LoopbackByteReceiver
LoopbackByteReceiver interface.AbstractByteReceiver.ConnectableAutomatonorg.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.Closable.CloseBuilder<B extends org.refcodes.component.Closable.CloseBuilder<B>>org.refcodes.component.ClosedAccessor.ClosedMutator, org.refcodes.component.ClosedAccessor.ClosedPropertyorg.refcodes.component.ConnectableComponent.ConnectableAutomatonorg.refcodes.component.ConnectionComponent.ConnectionAutomaton<CON extends Object>, org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON extends Object,B extends org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON,B>>org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<CON extends Object>, org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON extends Object,B extends org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON,B>>_datagramQueue, DATAGRAM_QUEUE_SIZE_automaton| Constructor | Description |
|---|---|
LoopbackByteReceiverImpl() |
Instantiates a new loopback byte receiver impl.
|
LoopbackByteReceiverImpl(int aCapacity) |
Instantiates a new loopback byte receiver impl.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
boolean |
isOpenable(LoopbackByteSender aLoopbackSender) |
|
void |
open(LoopbackByteSender aLoopbackSender) |
|
void |
pushDatagram(byte aDatagram) |
Pushes a datagram into the receiver and puts it into the blocking queue
containing the so far received datagrams.
|
void |
pushDatagrams(byte[] aDatagrams) |
Pushes datagrams into the receiver and puts them into the blocking queue
containing the so far received datagrams.
|
void |
pushDatagrams(byte[] aDatagrams,
int aOffset,
int aLength) |
Pushes datagrams into the receiver and puts them into the blocking queue
containing the so far received datagrams.
|
getConnectionStatus, hasDatagram, isClosable, isClosed, isOpenable, isOpened, open, readDatagram, readDatagrams, readDatagrams, releaseAll, setConnectionStatusreadDatagramreadDatagrams, readDatagramscloseIn, closeQuietly, closeUncheckedgetConnectionStatus, isConnectionOpenedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasDatagrampublic LoopbackByteReceiverImpl()
public LoopbackByteReceiverImpl(int aCapacity)
aCapacity - the capacitypublic boolean isOpenable(LoopbackByteSender aLoopbackSender)
isOpenable in interface org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<LoopbackByteSender>public void open(LoopbackByteSender aLoopbackSender) throws org.refcodes.component.OpenException
open in interface org.refcodes.component.ConnectionOpenable<LoopbackByteSender>org.refcodes.component.OpenExceptionpublic void pushDatagram(byte aDatagram)
throws org.refcodes.component.OpenException
AbstractByteProvider.readDatagram():
Use AbstractByteReceiver extension's
AbstractByteReceiver.hasDatagram() to test beforehand whether
there is a datagram available.pushDatagram in interface LoopbackByteReceiverpushDatagram in class AbstractByteProvideraDatagram - The datagram to be pushed at the end of the blocking
queue; to be retrieved with the AbstractByteProvider.readDatagram() method.org.refcodes.component.OpenException - the open exceptionpublic void pushDatagrams(byte[] aDatagrams)
throws org.refcodes.component.OpenException
AbstractByteProvider.readDatagram():
Use AbstractByteReceiver extension's
AbstractByteReceiver.hasDatagram() to test beforehand whether
there is a datagram available.pushDatagrams in interface LoopbackByteReceiverpushDatagrams in class AbstractByteProvideraDatagrams - The datagrams to be pushed at the end of the blocking
queue; to be retrieved with the AbstractByteProvider.readDatagram() method.org.refcodes.component.OpenException - the open exceptionpublic void pushDatagrams(byte[] aDatagrams,
int aOffset,
int aLength)
throws org.refcodes.component.OpenException
AbstractByteProvider.readDatagram():
Use AbstractByteReceiver extension's
AbstractByteReceiver.hasDatagram() to test beforehand whether
there is a datagram available.pushDatagrams in interface LoopbackByteReceiverpushDatagrams in class AbstractByteProvideraDatagrams - The datagrams to be pushed at the end of the blocking
queue; to be retrieved with the AbstractByteProvider.readDatagram() method.aOffset - The offset to start taking data from to be pushed.aLength - The number of elements to be pushed from the offset
onwards.org.refcodes.component.OpenException - the open exceptionpublic void close()
throws org.refcodes.component.CloseException
close in interface org.refcodes.component.Closableclose in class AbstractByteReceiverorg.refcodes.component.CloseExceptionCopyright © 2018. All rights reserved.