java.lang.Object
org.refcodes.component.AbstractConnectable
org.refcodes.component.AbstractConnectableAutomaton
org.refcodes.codec.ModemEncoderImpl
- All Implemented Interfaces:
Flushable
,Encoder
,ModemEncoder
,ModulatorStatusAccessor
,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
,org.refcodes.io.ByteSource
,org.refcodes.io.BytesSource
,org.refcodes.io.BytesTransmitter
,org.refcodes.io.ByteTransmitter
,org.refcodes.io.Transmittable
,org.refcodes.mixin.OutputStreamAccessor
public class ModemEncoderImpl
extends org.refcodes.component.AbstractConnectableAutomaton
implements ModemEncoder
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.io.BytesTransmitter
org.refcodes.io.BytesTransmitter.TransmitterOutputStream
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
Nested classes/interfaces inherited from interface org.refcodes.component.Flushable
org.refcodes.component.Flushable.FlushBuilder<B extends org.refcodes.component.Flushable.FlushBuilder<B>>
Nested classes/interfaces inherited from interface org.refcodes.codec.ModemEncoder
ModemEncoder.ModemEncoderConsumer
Nested classes/interfaces inherited from interface org.refcodes.codec.ModulatorStatusAccessor
ModulatorStatusAccessor.ModulatorStatusBuilder<B extends ModulatorStatusAccessor.ModulatorStatusBuilder<B>>, ModulatorStatusAccessor.ModulatorStatusMutator, ModulatorStatusAccessor.ModulatorStatusProperty
Nested classes/interfaces inherited from interface org.refcodes.component.OpenedAccessor
org.refcodes.component.OpenedAccessor.OpenedMutator, org.refcodes.component.OpenedAccessor.OpenedProperty
Nested classes/interfaces inherited from interface org.refcodes.mixin.OutputStreamAccessor
org.refcodes.mixin.OutputStreamAccessor.OutputStreamBuilder<B extends org.refcodes.mixin.OutputStreamAccessor.OutputStreamBuilder<?>>, org.refcodes.mixin.OutputStreamAccessor.OutputStreamMutator, org.refcodes.mixin.OutputStreamAccessor.OutputStreamProperty
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
ModemEncoderImpl
(ModemMetrics aModemMetrics) ModemEncoderImpl
(ModemMetrics aModemMetrics, org.refcodes.io.BytesSource aByteConsumer) Instantiates a new modem encoder impl.ModemEncoderImpl
(ModemMetrics aModemMetrics, org.refcodes.io.BytesTransmitter aByteSender) Instantiates a new modem encoder impl.ModemEncoderImpl
(ModemMetrics aModemMetrics, org.refcodes.io.ShortsSource aShortConsumer) Instantiates a new modem encoder impl.ModemEncoderImpl
(ModemMetrics aModemMetrics, org.refcodes.io.ShortsTransmitter aShortSender) Instantiates a new modem encoder impl. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
flush()
Retrieves the Modulator-Status from the Modulator-Status property.void
open()
protected void
open
(org.refcodes.io.BytesSource aConnection) protected void
open
(org.refcodes.io.ShortsSource aConnection) protected void
purge()
void
transmitBytes
(byte[] aBytes, int aOffset, int aLength) Methods inherited from class org.refcodes.component.AbstractConnectableAutomaton
getConnectionStatus, isClosable, isClosed, isOpenable, isOpened, setConnectionStatus
Methods inherited from class org.refcodes.component.AbstractConnectable
isThrownAsOfAlreadyClosed
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.refcodes.io.BytesSource
transmitByte, transmitBytes
Methods inherited from interface org.refcodes.io.BytesTransmitter
getOutputStream
Methods inherited from interface org.refcodes.component.Closable
closeIn, closeQuietly, closeUnchecked
Methods inherited from interface org.refcodes.component.Closable.CloseAutomaton
isClosable
Methods inherited from interface org.refcodes.component.ClosedAccessor
isClosed
Methods inherited from interface org.refcodes.component.ConnectionStatusAccessor
getConnectionStatus, isOpened
Methods inherited from interface org.refcodes.component.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, org.refcodes.io.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, org.refcodes.io.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:
transmitBytes
in interfaceorg.refcodes.io.BytesSource
- Specified by:
transmitBytes
in interfaceorg.refcodes.io.BytesTransmitter
- Throws:
IOException
-
getModulatorStatus
Retrieves the Modulator-Status from the Modulator-Status property.- Specified by:
getModulatorStatus
in interfaceModulatorStatusAccessor
- Returns:
- The Modulator-Status stored by the Modulator-Status property.
-
flush
- Specified by:
flush
in interfaceorg.refcodes.io.ByteTransmitter
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in interfaceorg.refcodes.component.Flushable
- Throws:
IOException
-
open
- Overrides:
open
in classorg.refcodes.component.AbstractConnectableAutomaton
- Throws:
IOException
-
close
- Specified by:
close
in interfaceorg.refcodes.component.Closable
- Overrides:
close
in classorg.refcodes.component.AbstractConnectableAutomaton
- Throws:
IOException
-
open
- Throws:
IOException
-
open
- Throws:
IOException
-
purge
protected void purge()
-