Examples of take()


Examples of org.uberfire.java.nio.file.WatchService.take()

        WatchService ws = null;
        ws = fs.newWatchService();
        final Path path = fs.getRootDirectories().iterator().next();
        path.register( ws, StandardWatchEventKind.ENTRY_CREATE, StandardWatchEventKind.ENTRY_MODIFY, StandardWatchEventKind.ENTRY_DELETE, StandardWatchEventKind.ENTRY_RENAME );

        final WatchKey k = ws.take();

        final List<WatchEvent<?>> events = k.pollEvents();
        for ( WatchEvent object : events ) {
            if ( object.kind() == StandardWatchEventKind.ENTRY_MODIFY ) {
                System.out.println( "Modify: " + object.context().toString() );
View Full Code Here

Examples of ru.decipher.proxy.impl.DefaultProxyManager.take()

                new DefaultProxyManager(new Mock3GoodHttpProxyNoDelayLoader(), 0, 1000, 10, 0);
        class Task implements Runnable {
            @Override
            public void run() {
                try {
                    final HttpProxyConfig proxy = manager.take();
                    //do something
                    manager.compliment(proxy);
                } catch (Exception e) {
                    e.printStackTrace();
                    throw new RuntimeException(e);
View Full Code Here

Examples of sicel.compiler.parser.Lexer.take()

    Lexer lexer = new LexerImpl();
    lexer.initialize( new File( "input.txt" ) );
    //System.out.println( lexer.lookAhead( 30 ) );
   
    Token t;
    while( ( t = lexer.take() ) != null )
    {
      System.out.println( t );
    }
   
    //System.out.println( lexer.lookAhead( 4 ) );
View Full Code Here

Examples of smilehouse.opensyncro.pipes.component.DestinationIF.take()

                             * Source component directly to Destination component
                             */

                            statusCode = LogEntry.STATUS_DESTINATION_ERROR;
                            currentTask = "Destination component " + this.destination.getName();
                            destination.take(sourceResults[j], info, logEntry);

                        }

                        statusCode = LogEntry.STATUS_OK;

View Full Code Here

Examples of thread.reentrancy.conditions.BoundedBuffer.take()

    public void testTakeBlocksWhenEmpty() {
        final   BoundedBuffer bb = new BoundedBuffer();
        Thread taker = new Thread() {
            public void run() {
                try {
                    Object unused = bb.take();
                    fail(); // if we get here, it's an error
                } catch (InterruptedException success) {
                }
            }
        };
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.