public class LoopbackByteTransceiverImpl extends AbstractByteReceiver implements LoopbackByteTransceiver
LoopbackByteTransceiver interface.AbstractByteReceiver.ConnectableAutomatonorg.refcodes.component.ConnectableComponent.ConnectableAutomatonorg.refcodes.component.OpenedAccessor.OpenedMutator, org.refcodes.component.OpenedAccessor.OpenedPropertyorg.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.ConnectionStatusAccessor.ConnectionStatusMutator, org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusPropertyorg.refcodes.component.Flushable.FlushBuilder<B extends org.refcodes.component.Flushable.FlushBuilder<B>>org.refcodes.component.ConnectionComponent.ConnectionAutomaton<CON>, org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON,B extends org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON,B>>org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<CON>, org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON,B extends org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON,B>>_automaton_datagramQueue, DATAGRAM_QUEUE_SIZE| Constructor and Description |
|---|
LoopbackByteTransceiverImpl()
Instantiates a new loopback byte transceiver impl.
|
LoopbackByteTransceiverImpl(int aCapacity)
Instantiates a new loopback byte transceiver impl.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
boolean |
isOpenable(LoopbackByteTransceiver aLoopbackTransceiver) |
void |
open(LoopbackByteTransceiver aLoopbackTransceiver) |
void |
pushDatagram(byte aDatagram)
Pushes a datagram into the receiver and puts it into the blocking queue
containing the so far received datagrams.
|
void |
writeDatagram(byte aDatagram)
Writes (sends) a byte.
|
getConnectionStatus, hasDatagram, isClosable, isClosed, isOpenable, isOpened, open, readDatagram, readDatagrams, readDatagrams, releaseAll, setConnectionStatuspushDatagrams, pushDatagramsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadDatagrams, readDatagramsreadDatagramhasDatagramwriteDatagramswriteDatagramscloseIn, closeQuietly, closeUncheckedpublic LoopbackByteTransceiverImpl()
public LoopbackByteTransceiverImpl(int aCapacity)
aCapacity - the a capacitypublic boolean isOpenable(LoopbackByteTransceiver aLoopbackTransceiver)
isOpenable in interface org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<LoopbackByteTransceiver>public void open(LoopbackByteTransceiver aLoopbackTransceiver) throws org.refcodes.component.OpenException
open in interface org.refcodes.component.ConnectionOpenable<LoopbackByteTransceiver>org.refcodes.component.OpenExceptionpublic void writeDatagram(byte aDatagram)
throws org.refcodes.component.OpenException
ByteDatagramConsumerwriteDatagram in interface ByteConsumerwriteDatagram in interface ByteDatagramConsumeraDatagram - The byte to be pushed.org.refcodes.component.OpenException - Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.public void pushDatagram(byte aDatagram)
throws org.refcodes.component.OpenException
AbstractByteProviderAbstractByteProvider.readDatagram():
Use AbstractByteReceiver extension's
AbstractByteReceiver.hasDatagram() to test beforehand whether
there is a datagram available.pushDatagram in interface LoopbackByteTransceiverpushDatagram 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 flush()
throws org.refcodes.component.OpenException
flush in interface Flushableflush in interface ByteSenderorg.refcodes.component.OpenExceptionpublic void close()
throws org.refcodes.component.CloseException
close in interface org.refcodes.component.Closableclose in class AbstractByteReceiverorg.refcodes.component.CloseExceptionCopyright © 2017. All rights reserved.