Package org.jscsi.scsi.protocol.mode

Examples of org.jscsi.scsi.protocol.mode.StaticModePageRegistry


   {
      _logger.debug("initializing test");

      taskSet = new DefaultTaskSet(TASK_SET_QUEUE_DEPTH);
      taskManager = new DefaultTaskManager(TASK_MGR_NUM_THREADS, taskSet);
      modeRegistry = new StaticModePageRegistry();
      inquiryRegistry = new StaticInquiryDataRegistry();

      store = ByteBuffer.allocate(STORE_BLOCK_SIZE * STORE_CAPACITY);
      taskFactory = new BufferedTaskFactory(store, STORE_BLOCK_SIZE, modeRegistry, inquiryRegistry);

View Full Code Here


   @Test
   public void testRequestAllModePages()
   {
      try
      {
         ModePageRegistry registry = new StaticModePageRegistry();

         Collection<ModePage> pages = execute6(registry, (byte) 0x3F, 0xFF);
         Iterator<ModePage> it = pages.iterator();

         matches(it.next(), (byte) 0x01, 0x00);
View Full Code Here

   @Test
   public void testRequestAllPage0ModePages()
   {
      try
      {
         ModePageRegistry registry = new StaticModePageRegistry();

         Collection<ModePage> pages = execute6(registry, (byte) 0x3F, 0x00);
         Iterator<ModePage> it = pages.iterator();

         matches(it.next(), (byte) 0x01, 0x00);
View Full Code Here

   @Test
   public void testRequestInvalidModePage()
   {
      try
      {
         ModePageRegistry registry = new StaticModePageRegistry();

         execute6(registry, (byte) 0x80, 0x00);
         fail("MODE SENSE request succeeded unexpectedly");
      }
      catch (ModeSenseException e)
View Full Code Here

   @Test
   public void testRequestValidModePage()
   {
      try
      {
         ModePageRegistry registry = new StaticModePageRegistry();

         Collection<ModePage> pages = execute6(registry, (byte) 0x08, 0x00);
         Iterator<ModePage> it = pages.iterator();

         matches(it.next(), (byte) 0x08, 0x00);
View Full Code Here

      super();
      TaskSet taskSet = new DefaultTaskSet(queueDepth);
      this.setTaskSet(taskSet);
      this.setTaskManager(new DefaultTaskManager(taskThreads, taskSet));

      this.setTaskFactory(new BufferedTaskFactory(store, blockSize, new StaticModePageRegistry(),
            new StaticInquiryDataRegistry()));
   }
View Full Code Here

      file = new RandomAccessFile(STORE_FILE_PATH, "rw");
      fileBuf = file.getChannel().map(FileChannel.MapMode.READ_WRITE, 0, STORE_CAPACITY);

      // initialize the registries
      modeRegistry = new StaticModePageRegistry();
      inquiryRegistry = new StaticInquiryDataRegistry();

      memFactory = new BufferedTaskFactory(memBuf, STORE_BLOCK_SIZE, modeRegistry, inquiryRegistry);
      fileFactory =
            new BufferedTaskFactory(fileBuf, STORE_BLOCK_SIZE, modeRegistry, inquiryRegistry);
View Full Code Here

TOP

Related Classes of org.jscsi.scsi.protocol.mode.StaticModePageRegistry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.