Module vcr4j.core

Class StatusDecorator<S extends VideoState,E extends VideoError>

java.lang.Object
org.mbari.vcr4j.decorators.StatusDecorator<S,E>
All Implemented Interfaces:
Decorator

public class StatusDecorator<S extends VideoState,E extends VideoError> extends Object implements Decorator
The VideoIO simply executes the commands send. For many applications, the desired behavior is to send a command to the VCR followed by a requestStatus. This class adds state requests to the command observable for requests that need it. Typical usage:
     VideoIO io = new RXTXVideoIO("COM 1");
     StatusDecorator decorator = new StatusDecorator(io.getCommandSubject());
     // That's it! Some commands will automatically trigger a status request.
     io.send(VideoCommands.STOP);
 
Since:
2016-03-25T11:34:00
Author:
Brian Schlining
  • Constructor Details

    • StatusDecorator

      public StatusDecorator(VideoIO<S,E> io)
  • Method Details

    • unsubscribe

      public void unsubscribe()
      Description copied from interface: Decorator
      Tells the decorator to unsubscribe from all Observables that it is watching.
      Specified by:
      unsubscribe in interface Decorator