Examples of drain()


Examples of org.jboss.example.jms.stateless.bean.StatelessSessionExample.drain()

      StatelessSessionExample bean = home.create();
                 
      String queueName = getDestinationJNDIName();
      String text = "Hello!";                 
     
      bean.drain(queueName);
                      
      bean.send("Hello!", queueName);
      log("The " + text + " message was successfully sent to the " + queueName + " queue");
         
      int num = bean.browse(queueName);
View Full Code Here

Examples of org.jboss.example.jms.stateless.bean.StatelessSessionExample.drain()

      StatelessSessionExample bean = home.create();
                 
      String queueName = getDestinationJNDIName();
      String text = "Hello!";                 
     
      bean.drain(queueName);
                      
      bean.send("Hello!", queueName);
      log("The " + text + " message was successfully sent to the " + queueName + " queue");
         
      int num = bean.browse(queueName);
View Full Code Here

Examples of org.jboss.example.jms.statelessclustered.bean.StatelessClusteredSessionExample.drain()

      StatelessClusteredSessionExample bean = home.create();

      String queueName = getDestinationJNDIName();
      String text = "Hello!";

      bean.drain(queueName);

      bean.send("Hello!", queueName);
      log("The " + text + " message was successfully sent to the " + queueName + " queue");

      int num = bean.browse(queueName);
View Full Code Here

Examples of org.restlet.engine.io.Buffer.drain()

        buffer.fill("abcdefghijklm");
        buffer.flip();

        for (int i = 0; i < 4; i++) {
            // Drain first characters
            buffer.drain();
        }

        buffer.flip();
        buffer.fill("nopqrst");
        buffer.flip();
View Full Code Here

Examples of org.restlet.engine.io.Buffer.drain()

        buffer.fill("nopqrst");
        buffer.flip();

        for (int i = 0; i < 4; i++) {
            // Drain first characters
            buffer.drain();
        }

        buffer.flip();
        buffer.fill("uvwxyz");
        buffer.flip();
View Full Code Here

Examples of org.restlet.engine.io.Buffer.drain()

        buffer.flip();
        buffer.fill("uvwxyz");
        buffer.flip();

        StringBuilder sb = new StringBuilder();
        buffer.drain(sb, BufferState.FILLING);
        assertEquals("Remaining buffer", "ijklmnopqrstuvwxyz", sb.toString());
    }
}
View Full Code Here

Examples of org.rococoa.cocoa.foundation.NSAutoreleasePool.drain()

        // if you create a Foundation-only application or if you detach a thread—you need to create
        // your own autorelease pool.
        Thread thread = new Thread("test") {
            public void run() {
                NSAutoreleasePool second = NSAutoreleasePool.new_();
                second.drain();
            }
        };
        thread.start();
        thread.join();
        RococoaTestCase.assertRetainCount(2, idString);
View Full Code Here

Examples of org.rococoa.cocoa.foundation.NSAutoreleasePool.drain()

       
        // it should now have been release'd
        assertRetainCount(expectedInitialRetainCount, alias);
       
        // now let the pool go
        pool.drain();

        assertRetainCount(expectedFinalRetainCount, alias);
    }

}
View Full Code Here

Examples of org.rococoa.cocoa.foundation.NSAutoreleasePool.drain()

            pool = NSAutoreleasePool.new_();
            return callable.call();
        } catch (Exception e) {
            throw e instanceof RuntimeException ? ((RuntimeException)e) : new RuntimeException(e);
        } finally {
            if ( pool != null ) pool.drain();
        }
    }
}
View Full Code Here

Examples of org.rococoa.cocoa.foundation.NSAutoreleasePool.drain()

    @Test
    public void garbageCollectDrainedPool() throws InterruptedException {
        Thread thread = new Thread("test") {
            public void run() {
                NSAutoreleasePool pool = NSAutoreleasePool.new_();
                pool.drain();
            }
        };
        thread.start();
        thread.join();
        RococoaTestCase.gc();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.