Package org.apache.geronimo.messaging

Examples of org.apache.geronimo.messaging.MsgHeader.addHeader()


       
        msg = new Msg();
        header = msg.getHeader();
        header.addHeader(MsgHeaderConstants.CORRELATION_ID, id);
        header.addHeader(MsgHeaderConstants.SRC_NODE, info.srcNode);
        header.addHeader(MsgHeaderConstants.DEST_NODES, info.node2);
        out.push(msg);
       
        receivedMsgs = info.remoteNode2.getPushedMsg();
        assertEquals(1, receivedMsgs.size());
        msg = (Msg) receivedMsgs.get(0);
View Full Code Here


     *
     * @param aMsg Msg to process.
     */
    public void push(Msg aMsg) {
        MsgHeader header = aMsg.getHeader();
        header.addHeader(key, value);
        next.push(aMsg);
    }

}
View Full Code Here

                        MsgHeaderConstants.DEST_NODE_PATH);
                if ( null != path ) {
                    // A path has already been computed. Gets the next hop.
                    target = path[0];
                    // Pops the next hop from the path.
                    header2.addHeader(
                        MsgHeaderConstants.DEST_NODE_PATH,
                        NodeInfo.pop(path));
                    RemoteNode remoteNode = findRemoteNode(target);
                    if ( null == remoteNode ) {
                        throw new CommunicationException(target +
View Full Code Here

                            " has failed during a topology reconfiguration.");
                    }
                    out = remoteNode.getMsgConsumerOut();
                   
                    // Inserts the computed path and the new dests.
                    header2.addHeader(MsgHeaderConstants.DEST_NODE_PATH, NodeInfo.pop(path));
                    header2.addHeader(MsgHeaderConstants.DEST_NODES, target);
                }
                out.push(msg2);
            }
        }
View Full Code Here

                    }
                    out = remoteNode.getMsgConsumerOut();
                   
                    // Inserts the computed path and the new dests.
                    header2.addHeader(MsgHeaderConstants.DEST_NODE_PATH, NodeInfo.pop(path));
                    header2.addHeader(MsgHeaderConstants.DEST_NODES, target);
                }
                out.push(msg2);
            }
        }
       
View Full Code Here

   
    public void afterPop(StreamInputStream anIn, Msg aMsg, Object anOpaque)
        throws IOException {
        List prePop = (List) anOpaque;
        MsgHeader header = aMsg.getHeader();
        header.addHeader(MsgHeaderConstants.BODY_TYPE, prePop.get(0));
        header.addHeader(MsgHeaderConstants.CORRELATION_ID, prePop.get(1));
        if ( 5 != prePop.size() ) {
            return;
        }
        header.addHeader(MsgHeaderConstants.SRC_NODE, prePop.get(2));
View Full Code Here

    public void afterPop(StreamInputStream anIn, Msg aMsg, Object anOpaque)
        throws IOException {
        List prePop = (List) anOpaque;
        MsgHeader header = aMsg.getHeader();
        header.addHeader(MsgHeaderConstants.BODY_TYPE, prePop.get(0));
        header.addHeader(MsgHeaderConstants.CORRELATION_ID, prePop.get(1));
        if ( 5 != prePop.size() ) {
            return;
        }
        header.addHeader(MsgHeaderConstants.SRC_NODE, prePop.get(2));
        header.addHeader(MsgHeaderConstants.DEST_NODE, prePop.get(3));
View Full Code Here

        header.addHeader(MsgHeaderConstants.BODY_TYPE, prePop.get(0));
        header.addHeader(MsgHeaderConstants.CORRELATION_ID, prePop.get(1));
        if ( 5 != prePop.size() ) {
            return;
        }
        header.addHeader(MsgHeaderConstants.SRC_NODE, prePop.get(2));
        header.addHeader(MsgHeaderConstants.DEST_NODE, prePop.get(3));
        header.addHeader(MsgHeaderConstants.DEST_NODES, prePop.get(4));
    }
   
    public Object beforePush(StreamOutputStream anOut, Msg aMsg)
View Full Code Here

        header.addHeader(MsgHeaderConstants.CORRELATION_ID, prePop.get(1));
        if ( 5 != prePop.size() ) {
            return;
        }
        header.addHeader(MsgHeaderConstants.SRC_NODE, prePop.get(2));
        header.addHeader(MsgHeaderConstants.DEST_NODE, prePop.get(3));
        header.addHeader(MsgHeaderConstants.DEST_NODES, prePop.get(4));
    }
   
    public Object beforePush(StreamOutputStream anOut, Msg aMsg)
        throws IOException {
View Full Code Here

        if ( 5 != prePop.size() ) {
            return;
        }
        header.addHeader(MsgHeaderConstants.SRC_NODE, prePop.get(2));
        header.addHeader(MsgHeaderConstants.DEST_NODE, prePop.get(3));
        header.addHeader(MsgHeaderConstants.DEST_NODES, prePop.get(4));
    }
   
    public Object beforePush(StreamOutputStream anOut, Msg aMsg)
        throws IOException {
        MsgHeader header = aMsg.getHeader();
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.