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.ConnectionComponent<OutputStream>
, org.refcodes.component.ConnectionComponent.ConnectionAutomaton<OutputStream>
, org.refcodes.component.ConnectionOpenable<OutputStream>
, org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<OutputStream>
, org.refcodes.component.ConnectionStatusAccessor
, org.refcodes.component.Flushable
, org.refcodes.component.OpenedAccessor
, ConnectionShortsTransmitter<OutputStream>
, ShortSource
, ShortsSource
, ShortsTransmitter
, ShortTransmitter
, Transmittable
public class OutputStreamConnectionShortsTransmitter extends AbstractShortsTransmitter implements ConnectionShortsTransmitter<OutputStream>
OutputStreamConnectionShortsTransmitter
is a
DatagramTransmitter
connected through I/O streams with a
InputStreamConnectionReceiver
. A Socket
or a
ServerSocket
may be used to retrieve the according I/O streams.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.ConnectableComponent.ConnectableAutomaton
org.refcodes.component.ConnectionComponent.ConnectionAutomaton<CON extends Object>, org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON extends Object,B extends org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON,B>>
org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<CON extends Object>, org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON extends Object,B extends org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON,B>>
org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusMutator, org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusProperty
Constructor | Description |
---|---|
OutputStreamConnectionShortsTransmitter() |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
|
void |
flush() |
|
boolean |
isOpenable(OutputStream aOutputStream) |
|
void |
open(OutputStream aOutputStream) |
|
void |
transmitShort(short aShort) |
Writes (sends) a short.
|
getConnectionStatus, isClosable, isClosed, isOpenable, isOpened, open, setConnectionStatus
closeIn, closeQuietly, closeUnchecked
getConnectionStatus, isOpened
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
transmitAllShorts
transmitShorts
public OutputStreamConnectionShortsTransmitter()
public void open(OutputStream aOutputStream) throws IOException
open
in interface org.refcodes.component.ConnectionOpenable<OutputStream>
IOException
public boolean isOpenable(OutputStream aOutputStream)
isOpenable
in interface org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<OutputStream>
public void flush() throws IOException
flush
in interface Flushable
flush
in interface org.refcodes.component.Flushable
flush
in interface ShortTransmitter
IOException
public void close() throws IOException
close
in interface org.refcodes.component.Closable
close
in class org.refcodes.component.AbstractConnectableAutomaton
IOException
public void transmitShort(short aShort) throws IOException
transmitShort
in interface ShortSource
transmitShort
in interface ShortsSource
aShort
- The short to be pushed.IOException
- Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.Copyright © 2021. All rights reserved.