public class LoopbackByteSenderImpl extends AbstractByteSender implements LoopbackByteSender
LoopbackByteSender
interface.org.refcodes.component.ConnectableComponent.ConnectableAutomaton
org.refcodes.component.OpenedAccessor.OpenedMutator, org.refcodes.component.OpenedAccessor.OpenedProperty
org.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.ClosedProperty
org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusMutator, org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusProperty
org.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>>
Constructor and Description |
---|
LoopbackByteSenderImpl() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
boolean |
isOpenable(LoopbackByteReceiver aLoopbackReceiver) |
void |
open(LoopbackByteReceiver aLoopbackReceiver) |
void |
writeDatagram(byte aDatagram)
Writes (sends) a byte.
|
void |
writeDatagrams(byte[] aDatagrams)
Writes (sends) a byte block.
|
void |
writeDatagrams(byte[] aDatagrams,
int aOffset,
int aLength)
Writes (sends) a byte block.
|
getConnectionStatus, isClosable, isClosed, isOpenable, isOpened, open, setConnectionStatus
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
closeIn, closeQuietly, closeUnchecked
public boolean isOpenable(LoopbackByteReceiver aLoopbackReceiver)
isOpenable
in interface org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<LoopbackByteReceiver>
public void open(LoopbackByteReceiver aLoopbackReceiver) throws org.refcodes.component.OpenException
open
in interface org.refcodes.component.ConnectionOpenable<LoopbackByteReceiver>
org.refcodes.component.OpenException
public void writeDatagram(byte aDatagram) throws org.refcodes.component.OpenException
writeDatagram
in interface ByteConsumer
writeDatagram
in interface ByteDatagramConsumer
aDatagram
- 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 writeDatagrams(byte[] aDatagrams, int aOffset, int aLength) throws org.refcodes.component.OpenException
writeDatagrams
in interface ByteBlockConsumer
writeDatagrams
in interface ByteSender
writeDatagrams
in class AbstractByteSender
aDatagrams
- The byte to be pushed.aOffset
- The offset from which to take the data.aLength
- The number of elements to push starting at the given
offset.org.refcodes.component.OpenException
- Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.public void writeDatagrams(byte[] aDatagrams) throws org.refcodes.component.OpenException
writeDatagrams
in interface ByteBlockConsumer
writeDatagrams
in interface ByteConsumer
aDatagrams
- 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 flush() throws org.refcodes.component.OpenException
flush
in interface Flushable
flush
in interface ByteSender
org.refcodes.component.OpenException
public void close() throws org.refcodes.component.CloseException
close
in interface org.refcodes.component.Closable
close
in class org.refcodes.component.AbstractConnectableAutomaton
org.refcodes.component.CloseException
Copyright © 2018. All rights reserved.