Package org.jgroups

Examples of org.jgroups.MessageListener


      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


      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 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, 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

         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 );
      dispatcher = new MuxMessageDispatcher( muxId, channel, wrapper, listener, adapter );
    }
    else {
      MessageListenerToRequestHandlerAdapter adapter = new MessageListenerToRequestHandlerAdapter( listener );
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

/*     */
/* 128 */     this.controlChannel.setOpt(3, Boolean.FALSE);
/*     */
/* 130 */     this.dataChannel.setOpt(3, Boolean.FALSE);
/*     */
/* 132 */     MessageListener messageListener = new ControlMessageListener(null);
/*     */
/* 134 */     MembershipListener membershipListener = new ControlMembershipListener(null);
/*     */
/* 136 */     RequestHandler requestHandler = new ControlRequestHandler(null);
/*     */
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

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.