Class ModemEncoderImpl
java.lang.Object
org.refcodes.component.AbstractConnectable
org.refcodes.component.AbstractConnectableAutomaton
org.refcodes.codec.ModemEncoderImpl
- All Implemented Interfaces:
Flushable, Encoder, ModemEncoder, ModulatorStatusAccessor, Closable, Closable.CloseAutomaton, ClosedAccessor, ConnectableComponent, ConnectableComponent.ConnectableAutomaton, ConnectionStatusAccessor, Flushable, OpenedAccessor, ByteSource, BytesSource, BytesTransmitter, ByteTransmitter, Transmittable, OutputStreamAccessor
-
Nested Class Summary
Nested classes/interfaces inherited from interface BytesTransmitter
BytesTransmitter.TransmitterOutputStreamNested classes/interfaces inherited from interface Closable
Closable.CloseAutomaton, Closable.CloseBuilder<B>Nested classes/interfaces inherited from interface ClosedAccessor
ClosedAccessor.ClosedMutator, ClosedAccessor.ClosedPropertyNested classes/interfaces inherited from interface ConnectableComponent
ConnectableComponent.ConnectableAutomatonNested classes/interfaces inherited from interface ConnectionStatusAccessor
ConnectionStatusAccessor.ConnectionStatusMutator, ConnectionStatusAccessor.ConnectionStatusPropertyNested classes/interfaces inherited from interface Flushable
Flushable.FlushBuilder<B>Nested classes/interfaces inherited from interface ModemEncoder
ModemEncoder.ModemEncoderConsumerNested classes/interfaces inherited from interface ModulatorStatusAccessor
ModulatorStatusAccessor.ModulatorStatusBuilder<B>, ModulatorStatusAccessor.ModulatorStatusMutator, ModulatorStatusAccessor.ModulatorStatusPropertyNested classes/interfaces inherited from interface OpenedAccessor
OpenedAccessor.OpenedMutator, OpenedAccessor.OpenedPropertyNested classes/interfaces inherited from interface OutputStreamAccessor
OutputStreamAccessor.OutputStreamBuilder<B>, OutputStreamAccessor.OutputStreamMutator, OutputStreamAccessor.OutputStreamProperty -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedModemEncoderImpl(ModemMetrics aModemMetrics) ModemEncoderImpl(ModemMetrics aModemMetrics, BytesSource aByteConsumer) Instantiates a new modem encoder impl.ModemEncoderImpl(ModemMetrics aModemMetrics, BytesTransmitter aByteSender) Instantiates a new modem encoder impl.ModemEncoderImpl(ModemMetrics aModemMetrics, ShortsSource aShortConsumer) Instantiates a new modem encoder impl.ModemEncoderImpl(ModemMetrics aModemMetrics, ShortsTransmitter aShortSender) Instantiates a new modem encoder impl. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidflush()Retrieves the Modulator-Status from the Modulator-Status property.voidopen()protected voidopen(BytesSource aConnection) protected voidopen(ShortsSource aConnection) protected voidpurge()voidtransmitBytes(byte[] aBytes, int aOffset, int aLength) Methods inherited from class AbstractConnectableAutomaton
getConnectionStatus, isClosable, isClosed, isOpenable, isOpened, setConnectionStatusMethods inherited from class AbstractConnectable
isThrownAsOfAlreadyClosedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BytesSource
transmitByte, transmitBytesMethods inherited from interface BytesTransmitter
getOutputStreamMethods inherited from interface Closable
closeIn, closeQuietly, closeUncheckedMethods inherited from interface Closable.CloseAutomaton
isClosableMethods inherited from interface ClosedAccessor
isClosedMethods inherited from interface ConnectionStatusAccessor
getConnectionStatus, isOpenedMethods inherited from interface Flushable
flushUnchecked, isFlushable
-
Field Details
-
_modulatorStatus
-
-
Constructor Details
-
ModemEncoderImpl
Instantiates a new modem encoder impl.- Parameters:
aModemMetrics- the modem metricsaByteConsumer- the byte consumer
-
ModemEncoderImpl
Instantiates a new modem encoder impl.- Parameters:
aModemMetrics- the modem metricsaShortConsumer- the short consumer
-
ModemEncoderImpl
public ModemEncoderImpl(ModemMetrics aModemMetrics, BytesTransmitter aByteSender) throws IOException Instantiates a new modem encoder impl.- Parameters:
aModemMetrics- the modem metricsaByteSender- the byte sender- Throws:
IOException- Signals that an I/O exception has occurred.
-
ModemEncoderImpl
public ModemEncoderImpl(ModemMetrics aModemMetrics, ShortsTransmitter aShortSender) throws IOException Instantiates a new modem encoder impl.- Parameters:
aModemMetrics- the modem metricsaShortSender- the short sender- Throws:
IOException- Signals that an I/O exception has occurred.
-
ModemEncoderImpl
-
-
Method Details
-
transmitBytes
- Specified by:
transmitBytesin interfaceBytesSource- Specified by:
transmitBytesin interfaceBytesTransmitter- Throws:
IOException
-
getModulatorStatus
Retrieves the Modulator-Status from the Modulator-Status property.- Specified by:
getModulatorStatusin interfaceModulatorStatusAccessor- Returns:
- The Modulator-Status stored by the Modulator-Status property.
-
flush
- Specified by:
flushin interfaceByteTransmitter- Specified by:
flushin interfaceFlushable- Specified by:
flushin interfaceFlushable- Throws:
IOException
-
open
- Overrides:
openin classAbstractConnectableAutomaton- Throws:
IOException
-
close
- Specified by:
closein interfaceClosable- Overrides:
closein classAbstractConnectableAutomaton- Throws:
IOException
-
open
- Throws:
IOException
-
open
- Throws:
IOException
-
purge
protected void purge()
-