Package org.servicemix.jbi.framework

Examples of org.servicemix.jbi.framework.ComponentConnector


     * @param packet
     * @throws MessagingException
     */
    public void doRouting(MessageExchangeImpl me) throws MessagingException{
        ComponentNameSpace id=me.getRole()==Role.PROVIDER?me.getDestinationId():me.getSourceId();
        ComponentConnector cc=broker.getRegistry().getComponentConnector(id);
        if(cc!=null){
            // let ActiveMQ do the routing ...
            try{
                String componentName=cc.getComponentNameSpace().getName();
                String destination = "";
                if (me.getRole() == Role.PROVIDER){
                    destination = INBOUND_PREFIX + componentName;
                }else {
                    destination = INBOUND_PREFIX + id.getContainerName();
View Full Code Here


        Set set = (Set) networkNodeKeyMap.get(containerName);
        if (set == null) {
            set = new CopyOnWriteArraySet();
            networkNodeKeyMap.put(containerName, set);
        }
        ComponentConnector cc = new ComponentConnector(packet);
        log.info("Adding Remote Component: " + cc);
        broker.getRegistry().addRemoteComponentConnector(cc);
        set.add(packet);
    }
View Full Code Here

        Set set = (Set) networkNodeKeyMap.get(containerName);
        if (set != null) {
            set.remove(packet);
            set.add(packet);
        }
        ComponentConnector cc = new ComponentConnector(packet);
        log.info("Updating remote Component: " + cc);
        broker.getRegistry().updateRemoteComponentConnector(cc);
    }
View Full Code Here

    private void removeRemotePacket(String containerName, ComponentPacket packet) {
        networkComponentKeyMap.remove(packet.getComponentNameSpace());
        Set set = (Set) networkNodeKeyMap.get(containerName);
        if (set != null) {
            set.remove(packet);
            ComponentConnector cc = new ComponentConnector(packet);
            log.info("Removing remote Component: " + cc);
            broker.getRegistry().removeRemoteComponentConnector(cc);
            if (set.isEmpty()) {
                networkNodeKeyMap.remove(containerName);
            }
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.ComponentConnector

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.