Examples of UpHandler


Examples of org.jgroups.UpHandler

      // MessageDispatcher superclass constructors will call start() so perform all init here
      this.setMembershipListener(transport);
      this.setChannel(channel);
      // If existing up handler is a muxing up handler, setChannel(..) will not have replaced it
      UpHandler handler = channel.getUpHandler();
      if (handler instanceof Muxer<?>) {
         @SuppressWarnings("unchecked")
         Muxer<UpHandler> mux = (Muxer<UpHandler>) handler;
         mux.setDefaultHandler(this.prot_adapter);
      }
View Full Code Here

Examples of org.jgroups.UpHandler

      // MessageDispatcher superclass constructors will call start() so perform all init here
      this.setMembershipListener(transport);
      this.setChannel(channel);
      // If existing up handler is a muxing up handler, setChannel(..) will not have replaced it
      UpHandler handler = channel.getUpHandler();
      if (handler instanceof Muxer<?>) {
         @SuppressWarnings("unchecked")
         Muxer<UpHandler> mux = (Muxer<UpHandler>) handler;
         mux.setDefaultHandler(this.prot_adapter);
      }
View Full Code Here

Examples of org.jgroups.UpHandler

  public void stop() {
    context.releaseService( MasterSelectorServiceProvider.class );
    context = null;
    try {
      if ( channel != null && channel.isOpen() ) {
        UpHandler handler = channel.getUpHandler();
        if ( handler instanceof Muxer ) {
          Muxer muxer = (Muxer) handler;
          muxer.remove( muxId );
        }
        else {
View Full Code Here

Examples of org.jgroups.UpHandler

    log.jGroupsStartingChannel();
    buildChannel( props );
    NodeSelectorStrategyHolder masterNodeSelector = context.requestService( MasterSelectorServiceProvider.class );
    JGroupsMasterMessageListener listener = new JGroupsMasterMessageListener( context, masterNodeSelector );

    UpHandler handler = channel.getUpHandler();
    if ( handler instanceof Muxer ) {
      Short n = (Short) props.get( MUX_ID );
      if ( n == null ) {
        throw log.missingJGroupsMuxId();
      }
View Full Code Here

Examples of org.jgroups.UpHandler

      if (dispatcher != null) {
         log.stoppingRpcDispatcher(clusterName);
         dispatcher.stop();
         if (channel != null) {
            // Remove reference to up_handler
            UpHandler handler = channel.getUpHandler();
            if (handler instanceof Muxer<?>) {
               @SuppressWarnings("unchecked")
               Muxer<UpHandler> mux = (Muxer<UpHandler>) handler;
               mux.setDefaultHandler(null);
            } else {
View Full Code Here

Examples of org.jgroups.UpHandler

    NodeSelectorStrategyHolder masterNodeSelector = serviceManager.requestService( MasterSelectorServiceProvider.class, context );
    JGroupsMasterMessageListener listener = new JGroupsMasterMessageListener( context, masterNodeSelector );

    JChannel channel = channelContainer.getChannel();

    UpHandler handler = channel.getUpHandler();
    if ( handler instanceof Muxer ) {
      Short muxId = (Short) props.get( MUX_ID );
      if ( muxId == null ) {
        throw log.missingJGroupsMuxId();
      }
View Full Code Here

Examples of org.jgroups.UpHandler

            case Event.MSG: {
                Message msg = (Message) evt.getArg();
                MuxHeader hdr = (MuxHeader) msg.getHeader(MuxRequestCorrelator.MUX_ID);
                if (hdr != null) {
                    short id = hdr.getId();
                    UpHandler handler = handlers.get(id);
                    return (handler != null) ? handler.up(evt) : new NoMuxHandler(id);
                }
                break;
            }
            case Event.VIEW_CHANGE: {
                for (UpHandler handler: handlers.values()) {
                    handler.up(evt);
                }
                break;
            }
        }
       
View Full Code Here

Examples of org.jgroups.UpHandler

        setRequestHandler(handler);
        start();
    }

    private Muxer<UpHandler> getMuxer() {
        UpHandler handler = channel.getUpHandler();
        return ((handler != null) && (handler instanceof MuxUpHandler)) ? (MuxUpHandler) handler : null;
    }
View Full Code Here

Examples of org.jgroups.UpHandler

        channel.addChannelListener(this);
        start();
    }

    private Muxer<UpHandler> getMuxer() {
        UpHandler handler = channel.getUpHandler();
        return ((handler != null) && (handler instanceof MuxUpHandler)) ? (MuxUpHandler) handler : null;
    }
View Full Code Here

Examples of org.jgroups.UpHandler

                                    InboundInvocationHandler inboundInvocationHandler) {
      // MessageDispatcher superclass constructors will call start() so perform all init here
      this.setMembershipListener(transport);
      this.setChannel(channel);
      // If existing up handler is a muxing up handler, setChannel(..) will not have replaced it
      UpHandler handler = channel.getUpHandler();
      if (handler instanceof Muxer<?>) {
         @SuppressWarnings("unchecked")
         Muxer<UpHandler> mux = (Muxer<UpHandler>) handler;
         mux.setDefaultHandler(this.prot_adapter);
      }
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.