Examples of MuxHeader


Examples of org.jgroups.blocks.mux.MuxHeader

    protected final static short MUX_ID = ClassConfigurator.getProtocolId(org.jgroups.blocks.mux.MuxRequestCorrelator.class);
    private final org.jgroups.Header header;
   
    public MuxRequestCorrelator(short id, Object transport, RequestHandler handler, Address localAddr) {
        super(ClassConfigurator.getProtocolId(RequestCorrelator.class), transport, handler, localAddr);
        this.header = new MuxHeader(id);
    }
View Full Code Here

Examples of org.jgroups.blocks.mux.MuxHeader

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

Examples of org.jgroups.mux.MuxHeader

    }



    public static void testMuxHeader() throws Exception {
        MuxHeader hdr=new MuxHeader();
        _testSize(hdr);

        hdr=new MuxHeader("bla");
        _testSize(hdr);

        ServiceInfo si=new ServiceInfo();
        hdr=new MuxHeader(si);
        _testSize(hdr);      
        _testSize(new MuxHeader(si));
    }
View Full Code Here

Examples of org.jgroups.mux.MuxHeader

        _testSize(si);
    }


    public void testMuxHeader() throws Exception {
        MuxHeader hdr=new MuxHeader();
        _testSize(hdr);

        hdr=new MuxHeader("bla");
        _testSize(hdr);

        ServiceInfo si=new ServiceInfo();
        hdr=new MuxHeader(si);
        _testSize(hdr);

        si=new ServiceInfo(ServiceInfo.STATE_REQ, null, null, null);
        _testSize(new MuxHeader(si));

        si=new ServiceInfo(ServiceInfo.STATE_REQ, "bla", null, null);
        _testSize(new MuxHeader(si));

        si=new ServiceInfo(ServiceInfo.STATE_REQ, null, new IpAddress(3333), null);
        _testSize(new MuxHeader(si));

        si=new ServiceInfo(ServiceInfo.STATE_REQ, null, null, new byte[]{'b', 'e', 'l', 'a'});
        _testSize(new MuxHeader(si));

        si=new ServiceInfo(ServiceInfo.STATE_REQ, "bla", new IpAddress(3333), new byte[]{'b', 'e', 'l', 'a'});
        _testSize(new MuxHeader(si));
    }
View Full Code Here

Examples of org.jgroups.mux.MuxHeader

        _testSize(si);    
    }


    public void testMuxHeader() throws Exception {
        MuxHeader hdr=new MuxHeader();
        _testSize(hdr);

        hdr=new MuxHeader("bla");
        _testSize(hdr);

        ServiceInfo si=new ServiceInfo();
        hdr=new MuxHeader(si);
        _testSize(hdr);      
        _testSize(new MuxHeader(si));
    }
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.