Class SegmentResult<SEGMENT extends Segment>

java.lang.Object
org.refcodes.serial.SegmentResult<SEGMENT>
Type Parameters:
SEGMENT - The Transmission instance 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

    Constructors
    Constructor
    Description
    Constructs the SegmentResult with the according arguments.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected SEGMENT
    Gets the segment.
    boolean
    protected void
    Notify result.
    protected void
    Sets the exception.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.refcodes.io.IOResultAccessor

    waitForResult

    Methods inherited from interface org.refcodes.mixin.ResultAccessor

    waitForResult
  • Constructor Details

    • SegmentResult

      public SegmentResult(SEGMENT aSegment)
      Constructs the SegmentResult with the according arguments.
      Parameters:
      aSegment - The Transmission which to manage,
  • Method Details

    • getResult

      public SEGMENT getResult() throws IOException
      Specified by:
      getResult in interface org.refcodes.mixin.ResultAccessor<SEGMENT extends Segment,IOException>
      Throws:
      IOException
    • hasResult

      public boolean hasResult()
      Specified by:
      hasResult in interface org.refcodes.mixin.ResultAccessor<SEGMENT extends Segment,IOException>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getSegment

      protected SEGMENT getSegment()
      Gets the segment.
      Returns:
      the segment
    • notifyResult

      protected void notifyResult()
      Notify result.
    • setException

      protected void setException(IOException aException)
      Sets the exception.
      Parameters:
      aException - the new exception