Package org.jgroups

Examples of org.jgroups.MessageListener


      // We don't want to receive local messages on any of the channels
      syncChannel.setOpt(Channel.LOCAL, Boolean.FALSE);

      asyncChannel.setOpt(Channel.LOCAL, Boolean.FALSE);

      MessageListener cml = new ControlMessageListener();
      MembershipListener ml = new ControlMembershipListener();
      RequestHandler rh = new PostOfficeRequestHandler();

      // register as a listener for nodeid-adress mapping events
      nodeAddressMapListener = new NodeAddressMapListener();
View Full Code Here


                }
                catch(java.io.IOException ioex) {
                }
            }

            adapter1.setListener(new MessageListener() {
                private boolean started=false;
                private boolean stopped=false;

                private long counter = 0L;
               
View Full Code Here

         this.channel = this.createChannel();              
      }
     
      // Subscribe to events generated by the channel
      MembershipListener meml = new MembershipListenerImpl();
      MessageListener msgl = this.stateIdPrefix == null ? null : new MessageListenerImpl();
      this.dispatcher = new RpcHandler(this.scopeId.shortValue(), this.channel, msgl, meml, new RequestMarshallerImpl(), new ResponseMarshallerImpl());
     
      if (!this.channel.isConnected())
      {
         this.channelSelfConnected = true;
View Full Code Here

            this.channel = this.createChannel();
        }

        // Subscribe to events generated by the channel
        MembershipListener meml = new MembershipListenerImpl();
        MessageListener msgl = this.stateIdPrefix == null ? null : new MessageListenerImpl();
        this.dispatcher = new RpcHandler(this.scopeId.shortValue(), this.channel, msgl, meml, new RequestMarshallerImpl(),
                new ResponseMarshallerImpl());

        if (!this.channel.isConnected()) {
            this.channelSelfConnected = true;
View Full Code Here

      if ( muxer.get( muxId ) != null ) {
        throw log.jGroupsMuxIdAlreadyTaken( muxId );
      }

      ClassLoader cl = (ClassLoader) props.get( CLASSLOADER );
      MessageListener wrapper = ( cl != null ) ? new ClassloaderMessageListener( listener, cl ) : listener;
      MessageListenerToRequestHandlerAdapter adapter = new MessageListenerToRequestHandlerAdapter( wrapper );
      MessageDispatcher dispatcher = new MuxMessageDispatcher( muxId, channel, wrapper, listener, adapter );
      sender = new DispatcherMessageSender( dispatcher );
    }
    else {
View Full Code Here

         this.channel = this.createChannel();              
      }
     
      // Subscribe to events generated by the channel
      MembershipListener meml = new MembershipListenerImpl();
      MessageListener msgl = this.stateIdPrefix == null ? null : new MessageListenerImpl();
      this.dispatcher = new RpcHandler(this.scopeId.shortValue(), this.channel, msgl, meml, new Object(), new RequestMarshallerImpl(), new ResponseMarshallerImpl());
     
      if (!this.channel.isConnected())
      {
         this.channelSelfConnected = true;
View Full Code Here

      // We don't want to receive local messages on any of the channels
      controlChannel.setOpt(Channel.LOCAL, Boolean.FALSE);

      dataChannel.setOpt(Channel.LOCAL, Boolean.FALSE);
     
      MessageListener messageListener = new ControlMessageListener();
     
      MembershipListener membershipListener = new ControlMembershipListener();
     
      RequestHandler requestHandler = new ControlRequestHandler();
     
View Full Code Here

        throw log.jGroupsMuxIdAlreadyTaken( n );
      }

      muxId = n;
      ClassLoader cl = (ClassLoader) props.get( CLASSLOADER );
      MessageListener wrapper = ( cl != null ) ? new ClassloaderMessageListener( listener, cl ) : listener;
      MessageListenerToRequestHandlerAdapter adapter = new MessageListenerToRequestHandlerAdapter( wrapper );
      MessageDispatcher dispatcher = new MuxMessageDispatcher( muxId, channel, wrapper, listener, adapter );
      sender = new DispatcherMessageSender( dispatcher );
    }
    else {
View Full Code Here

        this.stateIdPrefix = this.getClass().getName() + "." + this.scopeId + ".";

        // Subscribe to events generated by the channel
        MembershipListener meml = new MembershipListenerImpl();
        MessageListener msgl = this.stateIdPrefix == null ? null : new MessageListenerImpl();
        this.dispatcher = new RpcHandler(this.scopeId, this.channel, msgl, meml, new RequestMarshallerImpl(), new ResponseMarshallerImpl());

        meml.viewAccepted(this.channel.getView());
        // Since we haven't triggered a flush, we need to manually open the gate to allow rpcs.
        this.flushBlockGate.open();
View Full Code Here

      if ( muxer.get( muxId ) != null ) {
        throw log.jGroupsMuxIdAlreadyTaken( muxId );
      }

      ClassLoader cl = (ClassLoader) props.get( CLASSLOADER );
      MessageListener wrapper = ( cl != null ) ? new ClassloaderMessageListener( listener, cl ) : listener;
      MessageListenerToRequestHandlerAdapter adapter = new MessageListenerToRequestHandlerAdapter( wrapper );
      MessageDispatcher dispatcher = new MuxMessageDispatcher( muxId, channel, wrapper, listener, adapter );
      sender = new DispatcherMessageSender( dispatcher );
    }
    else {
View Full Code Here

TOP

Related Classes of org.jgroups.MessageListener

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.