Package org.refcodes.io
Interface LoopbackShortReceiver
-
- All Superinterfaces:
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<LoopbackShortSender>
,org.refcodes.component.ConnectionComponent.ConnectionAutomaton<LoopbackShortSender>
,org.refcodes.component.ConnectionOpenable<LoopbackShortSender>
,org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<LoopbackShortSender>
,ConnectionShortReceiver<LoopbackShortSender>
,org.refcodes.component.ConnectionStatusAccessor
,org.refcodes.component.OpenedAccessor
,Receivable
,org.refcodes.mixin.Releaseable
,ShortBlockProvider
,ShortBlockReceiver
,ShortDatagramProvider
,ShortDatagramReceiver
,ShortProvider
,ShortReceiver
- All Known Implementing Classes:
LoopbackShortReceiverImpl
public interface LoopbackShortReceiver extends ConnectionShortReceiver<LoopbackShortSender>
ALoopbackShortReceiver
is aDatagramReceiver
connected directly within the same JVM with aLoopbackShortSender
; a "loopback" connection is used for establishing the connection which cannot be accessed outside the JVM or the running machine.
-
-
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.ConnectionComponent
org.refcodes.component.ConnectionComponent.ConnectionAutomaton<CON extends java.lang.Object>, org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON extends java.lang.Object,B extends org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON,B>>
-
Nested classes/interfaces inherited from interface org.refcodes.component.ConnectionOpenable
org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<CON extends java.lang.Object>, org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON extends java.lang.Object,B extends org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON,B>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
pushDatagram(short aDatagram)
Pushes a datagram into theLoopbackShortReceiver
.default void
pushDatagrams(short[] aDatagrams)
Pushes the datagrams into theLoopbackByteReceiver
.default void
pushDatagrams(short[] aDatagrams, int aOffset, int aLength)
Pushes the according number of datagrams beginning at the given offset into theLoopbackByteReceiver
.-
Methods inherited from interface org.refcodes.component.Closable
close, closeIn, closeQuietly, closeUnchecked
-
Methods inherited from interface org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton
isOpenable
-
Methods inherited from interface org.refcodes.component.ConnectionStatusAccessor
getConnectionStatus, isConnectionOpened
-
Methods inherited from interface org.refcodes.io.Receivable
hasDatagram
-
Methods inherited from interface org.refcodes.io.ShortDatagramProvider
readDatagram
-
Methods inherited from interface org.refcodes.io.ShortReceiver
readDatagrams, readDatagrams
-
-
-
-
Method Detail
-
pushDatagram
void pushDatagram(short aDatagram) throws org.refcodes.component.OpenException
Pushes a datagram into theLoopbackShortReceiver
. Them datagrams can be retrieved viaShortDatagramProvider.readDatagram()
: useReceivable.hasDatagram()
to test beforehand whether there is a datagram available.- Parameters:
aDatagram
- The datagram to be pushed into theLoopbackShortReceiver
; to be retrieved with theShortDatagramProvider.readDatagram()
method.- Throws:
org.refcodes.component.OpenException
- the open exception
-
pushDatagrams
default void pushDatagrams(short[] aDatagrams) throws org.refcodes.component.OpenException
Pushes the datagrams into theLoopbackByteReceiver
. Them datagrams can be retrieved viaShortDatagramProvider.readDatagram()
: useReceivable.hasDatagram()
to test beforehand whether there is a datagram available.- Parameters:
aDatagrams
- The datagrams to be pushed into theLoopbackByteReceiver
; to be retrieved with theShortDatagramProvider.readDatagram()
method.- Throws:
org.refcodes.component.OpenException
- the open exception
-
pushDatagrams
default void pushDatagrams(short[] aDatagrams, int aOffset, int aLength) throws org.refcodes.component.OpenException
Pushes the according number of datagrams beginning at the given offset into theLoopbackByteReceiver
. Them datagrams can be retrieved viaShortDatagramProvider.readDatagram()
: useReceivable.hasDatagram()
to test beforehand whether there is a datagram available.- Parameters:
aDatagrams
- The datagrams to be pushed into theLoopbackByteReceiver
; to be retrieved with theShortDatagramProvider.readDatagram()
method.aOffset
- The offset from which to begin pushing.aLength
- The number of elements to be pushed.- Throws:
org.refcodes.component.OpenException
- the open exception
-
-