Package org.refcodes.io
Class AbstractByteSender
- java.lang.Object
-
- org.refcodes.component.AbstractConnectableAutomaton
-
- org.refcodes.io.AbstractByteSender
-
- All Implemented Interfaces:
java.io.Flushable,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.ConnectionStatusAccessor,org.refcodes.component.Flushable,org.refcodes.component.OpenedAccessor,ByteBlockConsumer,ByteBlockSender,ByteConsumer,ByteDatagramConsumer,ByteDatagramSender,ByteSender,Sendable
- Direct Known Subclasses:
ByteSenderDecorator,LoopbackByteSenderImpl,OutputStreamConnectionByteSenderImpl
public abstract class AbstractByteSender extends org.refcodes.component.AbstractConnectableAutomaton implements ByteSender
TheAbstractByteSenderis a base abstract implementation of theByteSenderinterface providing common functionality for concrete real liveByteDatagramSenderandByteBlockSender(=ByteSender) implementations.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.component.Closable
org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.Closable.CloseBuilder<B extends org.refcodes.component.Closable.CloseBuilder<B>>
-
Nested classes/interfaces inherited from interface org.refcodes.component.ClosedAccessor
org.refcodes.component.ClosedAccessor.ClosedMutator, org.refcodes.component.ClosedAccessor.ClosedProperty
-
Nested classes/interfaces inherited from interface org.refcodes.component.ConnectableComponent
org.refcodes.component.ConnectableComponent.ConnectableAutomaton
-
Nested classes/interfaces inherited from interface org.refcodes.component.ConnectionStatusAccessor
org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusMutator, org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusProperty
-
-
Constructor Summary
Constructors Constructor Description AbstractByteSender()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidwriteDatagrams(byte[] aDatagrams, int aOffset, int aLength)Writes (sends) a byte block.-
Methods inherited from class org.refcodes.component.AbstractConnectableAutomaton
close, getConnectionStatus, isClosable, isClosed, isOpenable, isOpened, open, setConnectionStatus
-
Methods inherited from interface org.refcodes.io.ByteConsumer
writeDatagram, writeDatagrams
-
Methods inherited from interface org.refcodes.io.ByteSender
flush
-
Methods inherited from interface org.refcodes.component.Closable
close, closeIn, closeQuietly, closeUnchecked
-
Methods inherited from interface org.refcodes.component.ConnectionStatusAccessor
getConnectionStatus, isConnectionOpened
-
-
-
-
Method Detail
-
writeDatagrams
public void writeDatagrams(byte[] aDatagrams, int aOffset, int aLength) throws org.refcodes.component.OpenExceptionWrites (sends) a byte block.- Specified by:
writeDatagramsin interfaceByteBlockConsumer- Specified by:
writeDatagramsin interfaceByteSender- Parameters:
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.- Throws:
org.refcodes.component.OpenException- Thrown in case opening or accessing an open line (connection, junction, link) caused problems.
-
-