java.lang.Object
org.refcodes.serial.SegmentResult<SEGMENT>
- Type Parameters:
SEGMENT- TheTransmissioninstance to be (re-)initialized asynchronously.
- All Implemented Interfaces:
org.refcodes.io.IOResultAccessor<SEGMENT,,IOException> org.refcodes.mixin.ResultAccessor<SEGMENT,IOException>
public class SegmentResult<SEGMENT extends Segment>
extends Object
implements org.refcodes.io.IOResultAccessor<SEGMENT,IOException>
A
SegmentResult instance is issued by the SerialReceiver to
receive a Transmission's data asynchronously.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.mixin.ResultAccessor
org.refcodes.mixin.ResultAccessor.ResultBuilder<RES extends Object,B extends org.refcodes.mixin.ResultAccessor.ResultBuilder<RES, B>>, org.refcodes.mixin.ResultAccessor.ResultMutator<RES extends Object>, org.refcodes.mixin.ResultAccessor.ResultProperty<RES extends Object, EXC extends Exception> -
Constructor Summary
ConstructorsConstructorDescriptionSegmentResult(SEGMENT aSegment) Constructs theSegmentResultwith the according arguments. -
Method Summary
Modifier and TypeMethodDescriptionprotected SEGMENTGets the segment.booleanprotected voidNotify result.protected voidsetException(IOException aException) Sets the exception.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.refcodes.io.IOResultAccessor
waitForResultMethods inherited from interface org.refcodes.mixin.ResultAccessor
waitForResult
-
Constructor Details
-
SegmentResult
Constructs theSegmentResultwith the according arguments.- Parameters:
aSegment- TheTransmissionwhich to manage,
-
-
Method Details
-
getResult
- Specified by:
getResultin interfaceorg.refcodes.mixin.ResultAccessor<SEGMENT extends Segment,IOException> - Throws:
IOException
-
hasResult
public boolean hasResult()- Specified by:
hasResultin interfaceorg.refcodes.mixin.ResultAccessor<SEGMENT extends Segment,IOException>
-
toString
-
getSegment
Gets the segment.- Returns:
- the segment
-
notifyResult
protected void notifyResult()Notify result. -
setException
Sets the exception.- Parameters:
aException- the new exception
-