Package java.nio.channels.spi

Examples of java.nio.channels.spi.AbstractSelectableChannel


        
          if ( obj instanceof AbstractSelectableChannel ){
          
             // process cancellation
          
            AbstractSelectableChannel  canceled_channel = (AbstractSelectableChannel)obj;
 
            try{
              SelectionKey key = canceled_channel.keyFor( selector );
             
              if( key != null ){
               
                key.cancel()//cancel the key, since already registered
              }
View Full Code Here


     * Test of getChannel method, of class HTTPRawSampler.
     */
    @Test
    public void testGetChannel() throws Exception {
        System.out.println("getChannel");
        AbstractSelectableChannel result = instance.getChannel();
        assertNotNull(result);
    }
View Full Code Here

     */
    @Test
    public void testGetChannel() throws Exception {
        System.out.println("getChannel");
        AbstractIPSampler instance = new AbstractIPSamplerImpl();
        AbstractSelectableChannel expResult = null;
        AbstractSelectableChannel result = instance.getChannel();
        assertEquals(expResult, result);
    }
View Full Code Here

          ++numReqs;
        }
      }

      for (int i = 0; i < numReqs; ++i) {
        AbstractSelectableChannel result = handlers[i].channel();
        if (!stopping) {
          try {
            result.register(selector_, SelectionKey.OP_READ, handlers[i]);
          } catch (Exception e) {
            LOG.warn("Fails to register a channel", e);
          }
        } else {
          try {
View Full Code Here

TOP

Related Classes of java.nio.channels.spi.AbstractSelectableChannel

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.