View Javadoc
1   /*
2    * Copyright (C) 2005-2015 Schlichtherle IT Services.
3    * All rights reserved. Use is subject to license terms.
4    */
5   package net.java.truevfs.comp.inst;
6   
7   import java.nio.channels.SeekableByteChannel;
8   import java.util.Objects;
9   import javax.annotation.concurrent.Immutable;
10  import net.java.truecommons.io.DecoratingSeekableChannel;
11  
12  /**
13   * @param  <M> the type of the mediator.
14   * @author Christian Schlichtherle
15   */
16  @Immutable
17  public class InstrumentingSeekableChannel<M extends Mediator<M>>
18  extends DecoratingSeekableChannel {
19  
20      protected final M mediator;
21  
22      public InstrumentingSeekableChannel(
23              final M mediator,
24              final SeekableByteChannel channel) {
25          super(channel);
26          this.mediator = Objects.requireNonNull(mediator);
27      }
28  }