Package org.apache.geronimo.messaging

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


     *
     * @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


            new RemoteNodeJoinerConnection(remoteNodeInfo, ioContext, sm);
        setConnection(connection);

        Msg msg = new Msg();
        MsgHeader header = msg.getHeader();
        header.addHeader(MsgHeaderConstants.SRC_NODE, localNodeInfo);
        header.addHeader(MsgHeaderConstants.DEST_NODE, remoteNodeInfo);
       
        // Only set to comply with a valid request.
        header.addHeader(MsgHeaderConstants.DEST_NODES, remoteNodeInfo);
        header.addHeader(MsgHeaderConstants.SRC_ENDPOINT, "");
View Full Code Here

        setConnection(connection);

        Msg msg = new Msg();
        MsgHeader header = msg.getHeader();
        header.addHeader(MsgHeaderConstants.SRC_NODE, localNodeInfo);
        header.addHeader(MsgHeaderConstants.DEST_NODE, remoteNodeInfo);
       
        // Only set to comply with a valid request.
        header.addHeader(MsgHeaderConstants.DEST_NODES, remoteNodeInfo);
        header.addHeader(MsgHeaderConstants.SRC_ENDPOINT, "");
        header.addHeader(MsgHeaderConstants.CORRELATION_ID,
View Full Code Here

        MsgHeader header = msg.getHeader();
        header.addHeader(MsgHeaderConstants.SRC_NODE, localNodeInfo);
        header.addHeader(MsgHeaderConstants.DEST_NODE, remoteNodeInfo);
       
        // Only set to comply with a valid request.
        header.addHeader(MsgHeaderConstants.DEST_NODES, remoteNodeInfo);
        header.addHeader(MsgHeaderConstants.SRC_ENDPOINT, "");
        header.addHeader(MsgHeaderConstants.CORRELATION_ID,
            new RequestSender.RequestID((byte) 0));
        header.addHeader(MsgHeaderConstants.BODY_TYPE, MsgBody.Type.REQUEST);
        header.addHeader(MsgHeaderConstants.TOPOLOGY_VERSION, new Integer(0));
View Full Code Here

        header.addHeader(MsgHeaderConstants.SRC_NODE, localNodeInfo);
        header.addHeader(MsgHeaderConstants.DEST_NODE, remoteNodeInfo);
       
        // Only set to comply with a valid request.
        header.addHeader(MsgHeaderConstants.DEST_NODES, remoteNodeInfo);
        header.addHeader(MsgHeaderConstants.SRC_ENDPOINT, "");
        header.addHeader(MsgHeaderConstants.CORRELATION_ID,
            new RequestSender.RequestID((byte) 0));
        header.addHeader(MsgHeaderConstants.BODY_TYPE, MsgBody.Type.REQUEST);
        header.addHeader(MsgHeaderConstants.TOPOLOGY_VERSION, new Integer(0));
       
View Full Code Here

        header.addHeader(MsgHeaderConstants.DEST_NODE, remoteNodeInfo);
       
        // Only set to comply with a valid request.
        header.addHeader(MsgHeaderConstants.DEST_NODES, remoteNodeInfo);
        header.addHeader(MsgHeaderConstants.SRC_ENDPOINT, "");
        header.addHeader(MsgHeaderConstants.CORRELATION_ID,
            new RequestSender.RequestID((byte) 0));
        header.addHeader(MsgHeaderConstants.BODY_TYPE, MsgBody.Type.REQUEST);
        header.addHeader(MsgHeaderConstants.TOPOLOGY_VERSION, new Integer(0));
       
        msg.getBody().setContent(localNodeInfo);
View Full Code Here

        // Only set to comply with a valid request.
        header.addHeader(MsgHeaderConstants.DEST_NODES, remoteNodeInfo);
        header.addHeader(MsgHeaderConstants.SRC_ENDPOINT, "");
        header.addHeader(MsgHeaderConstants.CORRELATION_ID,
            new RequestSender.RequestID((byte) 0));
        header.addHeader(MsgHeaderConstants.BODY_TYPE, MsgBody.Type.REQUEST);
        header.addHeader(MsgHeaderConstants.TOPOLOGY_VERSION, new Integer(0));
       
        msg.getBody().setContent(localNodeInfo);

        final FutureResult result = new FutureResult();
View Full Code Here

        header.addHeader(MsgHeaderConstants.DEST_NODES, remoteNodeInfo);
        header.addHeader(MsgHeaderConstants.SRC_ENDPOINT, "");
        header.addHeader(MsgHeaderConstants.CORRELATION_ID,
            new RequestSender.RequestID((byte) 0));
        header.addHeader(MsgHeaderConstants.BODY_TYPE, MsgBody.Type.REQUEST);
        header.addHeader(MsgHeaderConstants.TOPOLOGY_VERSION, new Integer(0));
       
        msg.getBody().setContent(localNodeInfo);

        final FutureResult result = new FutureResult();
        setMsgProducerOut(new MsgOutInterceptor() {
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

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.