Package org.jgroups.protocols

Examples of org.jgroups.protocols.UNICAST3$Header


            channels[i] = new JChannel(
                new TCP(),
                ping,
                new NAKACK2(),
                new UNICAST3(),
                new STABLE(),
                new GMS()
            );
            channels[i].setName(Character.toString((char) ('A' + i)));
            channels[i].connect(CLUSTER_NAME);
View Full Code Here


        JChannel retval=new JChannel(new SHARED_LOOPBACK(),
                                     new DISCARD().setValue("discard_all",true),
                                     new SHARED_LOOPBACK_PING(),
                                     new NAKACK2().setValue("use_mcast_xmit",false)
                                       .setValue("log_discard_msgs",false).setValue("log_not_found_msgs",false),
                                     new UNICAST3(),
                                     new STABLE().setValue("max_bytes",50000),
                                     new GMS().setValue("print_local_addr",false)
                                       .setValue("join_timeout", 1)
                                       .setValue("leave_timeout",100)
                                       .setValue("merge_timeout",5000)
View Full Code Here

    protected JChannel createChannel(String name) throws Exception {
        JChannel ch=new JChannel(new SHARED_LOOPBACK(),
                                 new SHARED_LOOPBACK_PING(),
                                 new NAKACK2().setValue("become_server_queue_size", 10),
                                 new UNICAST3(),
                                 new GMS().setValue("print_local_addr", false));
        ch.setName(name);
        return ch;
    }
View Full Code Here

    protected JChannel createChannel(String name) throws Exception {
        JChannel retval=new JChannel(new SHARED_LOOPBACK(),
                                     new SHARED_LOOPBACK_PING(),
                                     new NAKACK2().setValue("use_mcast_xmit",false)
                                       .setValue("log_discard_msgs",false).setValue("log_not_found_msgs",false),
                                     new UNICAST3(),
                                     new STABLE().setValue("max_bytes",50000),
                                     new GMS().setValue("print_local_addr",false)
                                       .setValue("join_timeout", 100)
                                       .setValue("leave_timeout", 100)
                                       .setValue("merge_timeout",5000)
View Full Code Here

    protected JChannel createChannel(String name) throws Exception {
        JChannel ch=Util.createChannel(new SHARED_LOOPBACK(),
                                       new PING(),
                                       new NAKACK2().setValue("become_server_queue_size", 10),
                                       new UNICAST3(),
                                       new GMS().setValue("print_local_addr", false).setValue("join_timeout", 500));
        ch.setName(name);
        return ch;
    }
View Full Code Here

    protected static Protocol[] props() {
        return new Protocol[]{
          new SHARED_LOOPBACK().setValue("bundler_type", "sender-sends").setValue("ignore_dont_bundle", false),
          new SHARED_LOOPBACK_PING(),
          new NAKACK2(),
          new UNICAST3().setValue("conn_expiry_timeout", 0).setValue("conn_close_timeout", 0),
          new STABLE(),
          new GMS()};
    }
View Full Code Here

     */
    public void sendUnicast(JChannel ch) throws Exception {
        final Message msg=new Message(ch.getAddress(), ch.getAddress(), "hello-1");

        // Add a UNICAST2 header
        final UNICAST3 unicast=(UNICAST3)ch.getProtocolStack().findProtocol(UNICAST3.class);
        UNICAST3.Header hdr=UNICAST3.Header.createDataHeader(1, (short)1, true);
        msg.putHeader(unicast.getId(), hdr);

        new Thread() {
            public void run() {
                unicast.down(new Event(Event.MSG, msg));
            }
        }.start();
    }
View Full Code Here

        log.debug("Unmarshalling SOAP message");
        Envelope soapMessage = (Envelope) unmarshallMessage(inTransport.getIncomingStream());
        samlMsgCtx.setInboundMessage(soapMessage);

        Header messageHeader = soapMessage.getHeader();
        if (messageHeader != null) {
            checkUnderstoodSOAPHeaders(soapMessage.getHeader().getUnknownXMLObjects());
        }

        List<XMLObject> soapBodyChildren = soapMessage.getBody().getUnknownXMLObjects();
View Full Code Here

     * @param messageContext the current message context being processed
     * @return a SOAPAction HTTP header URI value
     */
    protected String getSOAPAction(MessageContext messageContext) {
        Envelope env = (Envelope) messageContext.getOutboundMessage();
        Header header = env.getHeader();
        if (header == null) {
            return null;
        }
        List<XMLObject> objList = header.getUnknownXMLObjects(Action.ELEMENT_NAME);
        if (objList == null || objList.isEmpty()) {
            return null;
        } else {
            return ((Action)objList.get(0)).getValue();
        }
View Full Code Here

     */
    private void checkUnderstoodSOAPHeaders(MessageContext messageContext)
            throws MessageDecodingException {
       
        Envelope envelope = (Envelope) messageContext.getInboundMessage();
        Header soapHeader = envelope.getHeader();
        if (soapHeader == null) {
            log.debug("SOAP Envelope contained no Header");
            return;
        }
        List<XMLObject> headers = soapHeader.getUnknownXMLObjects();
        if (headers == null || headers.isEmpty()) {
            log.debug("SOAP Envelope header list was either null or empty");
            return;
        }

View Full Code Here

TOP

Related Classes of org.jgroups.protocols.UNICAST3$Header

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.