Package org.drools.grid.io

Examples of org.drools.grid.io.MessageReceiverHandler


    }


    @Test
    public void simpleEvictionTest() throws InterruptedException {
        MessageReceiverHandler handler = new GridNodeImpl( "myNode", null ).getMessageReceiverHandler();
        ContextImplWithEviction contextTemp = (ContextImplWithEviction) ((GridNodeServer) handler).getData().getTemp();
        ((ContextImplWithEviction) contextTemp).setEntryEvictionTime(2000); // 2 seconds
        ((ContextImplWithEviction) contextTemp).setEvictionWakeUpTime(1000); // 1 seconds
        JDKTimerService timer = new JDKTimerService(1);
       
View Full Code Here


    @Test
    public void test1() throws Exception {
        SystemEventListener l = SystemEventListenerFactory.getSystemEventListener();

        MessageReceiverHandler accHandler = new MessageReceiverHandler() {

            private String     id;
            private AtomicLong counter = new AtomicLong();

            public void messageReceived(Conversation conversation,
View Full Code Here

            logger.debug( " ### Trying to add a service -> " + id + " @ " + this.ip + ":" + port + " >> " + object + " [[ " + (object instanceof MessageReceiverHandlerFactoryService ));
        }
        MessageReceiverHandlerFactoryService handlerFactory = ( MessageReceiverHandlerFactoryService ) object;
        Acceptor acc = this.acceptors.get( port );

        MessageReceiverHandler h = handlerFactory.getMessageReceiverHandler();

        if ( acc == null ) {
            acc = factory.newAcceptor();

            MultiplexSocket ms = new MultiplexSocket();
View Full Code Here

                                        int port,
                                        Object object) {
        MessageReceiverHandlerFactoryService handlerFactory = ( MessageReceiverHandlerFactoryService ) object;
        Acceptor acc = this.acceptors.get( port );

        MessageReceiverHandler h = handlerFactory.getMessageReceiverHandler();
       
        if ( acc == null ) {
            acc = factory.newAcceptor();

            MultiplexSocket ms = new MultiplexSocket();
View Full Code Here

                                        int port,
                                        Object object) {
        MessageReceiverHandlerFactoryService handlerFactory = ( MessageReceiverHandlerFactoryService ) object;
        Acceptor acc = this.acceptors.get( port );

        MessageReceiverHandler h = handlerFactory.getMessageReceiverHandler();
       
        if ( acc == null ) {
            acc = factory.newAcceptor();

            MultiplexSocket ms = new MultiplexSocket();
View Full Code Here

                                 msgRecHandler );
    }

    public void messageReceived(Conversation conversation,
                                Message msg) {
        MessageReceiverHandler msgRecHandler = this.msgRecHandlers.remove( msg.getResponseId() );
        if ( msgRecHandler != null ) {
            msgRecHandler.messageReceived( conversation,
                                           msg );
        }
    }
View Full Code Here

    }


    @Test
    public void simpleEvictionTest() throws InterruptedException {
        MessageReceiverHandler handler = new GridNodeImpl("myNode").getMessageReceiverHandler();
        ContextImplWithEviction contextTemp = (ContextImplWithEviction) ((GridNodeServer) handler).getData().getTemp();
        ((ContextImplWithEviction) contextTemp).setEntryEvictionTime(2000); // 2 seconds
        ((ContextImplWithEviction) contextTemp).setEvictionWakeUpTime(1000); // 1 seconds
        JDKTimerService timer = new JDKTimerService(1);
       
View Full Code Here

    }


    @Test
    public void simpleEvictionTest() throws InterruptedException {
        MessageReceiverHandler handler = new GridNodeImpl("myNode").getMessageReceiverHandler();
        ContextImplWithEviction contextTemp = (ContextImplWithEviction) ((GridNodeServer) handler).getData().getTemp();
        ((ContextImplWithEviction) contextTemp).setEntryEvictionTime(2000); // 2 seconds
        ((ContextImplWithEviction) contextTemp).setEvictionWakeUpTime(1000); // 1 seconds
        JDKTimerService timer = new JDKTimerService(1);
View Full Code Here

    @Test
    public void test1() throws Exception {
        SystemEventListener l = SystemEventListenerFactory.getSystemEventListener();

        MessageReceiverHandler accHandler = new MessageReceiverHandler() {

            private String     id;
            private AtomicLong counter = new AtomicLong();

            public void messageReceived(Conversation conversation,
View Full Code Here

    @Test
    public void test1() throws Exception {
        SystemEventListener l = SystemEventListenerFactory.getSystemEventListener();

        MessageReceiverHandler accHandler = new MessageReceiverHandler() {

            private String     id;
            private AtomicLong counter = new AtomicLong();

            public void messageReceived(Conversation conversation,
View Full Code Here

TOP

Related Classes of org.drools.grid.io.MessageReceiverHandler

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.