Package org.servicemix.jbi.framework

Examples of org.servicemix.jbi.framework.ComponentPacket


        if (started.get()) {
            ConsumerInfo info = event.getInfo();
            if (info.isStarted()) {
                for (Iterator i = broker.getRegistry().getLocalComponentConnectors().iterator();i.hasNext();) {
                    LocalComponentConnector lcc = (LocalComponentConnector) i.next();
                    ComponentPacket packet = lcc.getPacket();
                    ComponentPacketEvent cpe = new ComponentPacketEvent(packet, ComponentPacketEvent.ACTIVATED);
                    onEvent(cpe);
                }
            }
            else {
View Full Code Here


     *
     * @param containerName
     * @param event
     */
    protected void processInBoundPacket(String containerName, ComponentPacketEvent event) {
        ComponentPacket packet = event.getPacket();
        if (!packet.getComponentNameSpace().getContainerName().equals(broker.getContainerName())) {
          log.info("received from internal JMS network: " + event);
            if (event.getStatus() == ComponentPacketEvent.ACTIVATED) {
                addRemotePacket(containerName, packet);
            }
            else if (event.getStatus() == ComponentPacketEvent.DEACTIVATED) {
View Full Code Here

    private void removeAllPackets(String containerName) {
        Set set = (Set) networkNodeKeyMap.remove(containerName);
        if (set != null) {
          for (Iterator i = set.iterator();i.hasNext();) {
              ComponentPacket packet = (ComponentPacket) i.next();
              ComponentConnector cc = new ComponentConnector(packet);
              log.info("Network node: " + containerName + " Stopped. Removing remote Component: " + cc);
              broker.getRegistry().removeRemoteComponentConnector(cc);
              networkComponentKeyMap.remove(packet.getComponentNameSpace());
          }
        }
    }
View Full Code Here

     */
    public void onNodeAdd(ClusterEvent event) {
        // send all registered Components to the remote cluster node
        for (Iterator i = broker.getRegistry().getLocalComponentConnectors().iterator();i.hasNext();) {
            LocalComponentConnector lcc = (LocalComponentConnector) i.next();
            ComponentPacket packet = lcc.getPacket();
            ComponentPacketEvent cpe = new ComponentPacketEvent(packet, ComponentPacketEvent.ACTIVATED);
            onEvent(cpe);
        }
    }
View Full Code Here

     *
     * @param nodeName
     * @param event
     */
    protected void processInBoundPacket(Destination nodeName, ComponentPacketEvent event) {
        ComponentPacket packet = event.getPacket();
        if (!packet.getComponentNameSpace().getContainerName().equals(broker.getContainerName())) {
            if (event.getStatus() == ComponentPacketEvent.ACTIVATED) {
                addRemotePacket(nodeName, packet);
            }
            else if (event.getStatus() == ComponentPacketEvent.DEACTIVATED) {
                removeRemotePacket(nodeName, packet);
View Full Code Here

    private void removeAllPackets(Destination nodeName) {
        Set set = (Set) clusterNodeKeyMap.remove(nodeName);
        if (set != null) {
          for (Iterator i = set.iterator();i.hasNext();) {
              ComponentPacket packet = (ComponentPacket) i.next();
              ComponentConnector cc = new ComponentConnector(packet);
              log.info("Cluster node: " + nodeName + " Stopped. Removing remote Component: " + cc);
              broker.getRegistry().removeRemoteComponentConnector(cc);
              clusterComponentKeyMap.remove(packet.getComponentNameSpace());
          }
        }
    }
View Full Code Here

        if (started.get()) {
            ConsumerInfo info = event.getInfo();
            if (info.isStarted()) {
                for (Iterator i = broker.getRegistry().getLocalComponentConnectors().iterator();i.hasNext();) {
                    LocalComponentConnector lcc = (LocalComponentConnector) i.next();
                    ComponentPacket packet = lcc.getPacket();
                    ComponentPacketEvent cpe = new ComponentPacketEvent(packet, ComponentPacketEvent.ACTIVATED);
                    onEvent(cpe);
                }
            }
            else {
View Full Code Here

     *
     * @param containerName
     * @param event
     */
    protected void processInBoundPacket(String containerName, ComponentPacketEvent event) {
        ComponentPacket packet = event.getPacket();
        if (!packet.getComponentNameSpace().getContainerName().equals(broker.getContainerName())) {
            if (event.getStatus() == ComponentPacketEvent.ACTIVATED) {
                addRemotePacket(containerName, packet);
            }
            else if (event.getStatus() == ComponentPacketEvent.DEACTIVATED) {
                removeRemotePacket(containerName, packet);
View Full Code Here

    private void removeAllPackets(String containerName) {
        Set set = (Set) networkNodeKeyMap.remove(containerName);
        if (set != null) {
          for (Iterator i = set.iterator();i.hasNext();) {
              ComponentPacket packet = (ComponentPacket) i.next();
              ComponentConnector cc = new ComponentConnector(packet);
              log.info("Network node: " + containerName + " Stopped. Removing remote Component: " + cc);
              broker.getRegistry().removeRemoteComponentConnector(cc);
              networkComponentKeyMap.remove(packet.getComponentNameSpace());
          }
        }
    }
View Full Code Here

TOP

Related Classes of org.servicemix.jbi.framework.ComponentPacket

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.