Package org.apache.synapse.endpoints

Examples of org.apache.synapse.endpoints.Endpoint


    public void testSimpleObserver() {
        SynapseConfiguration synapseConfig = new SynapseConfiguration();
        synapseConfig.setAxisConfiguration(new AxisConfiguration());
        synapseConfig.registerObserver(observer);

        Endpoint epr = new AddressEndpoint();
        epr.setName("endpoint1");
        synapseConfig.addEndpoint(epr.getName(), epr);
        assertItemAdded(epr.getName(), ENDPOINT);
        synapseConfig.removeEndpoint(epr.getName());
        assertItemRemoved(epr.getName(), ENDPOINT);

        SequenceMediator seq = new SequenceMediator();
        seq.setName("sequence1");
        synapseConfig.addSequence(seq.getName(), seq);
        assertItemAdded(seq.getName(), SEQUENCE);
View Full Code Here


            Iterator endpoints = FileUtils.iterateFiles(endpointsDir, extensions, false);
            while (endpoints.hasNext()) {
                File file = (File) endpoints.next();
                OMElement document = getOMElement(file);
                Endpoint endpoint = SynapseXMLConfigurationFactory.defineEndpoint(
                        synapseConfig, document, properties);
                if (endpoint != null) {
                    endpoint.setFileName(file.getName());
                    synapseConfig.getArtifactDeploymentStore().addArtifact(
                            file.getAbsolutePath(), endpoint.getName());
                }
            }
        }
    }
View Full Code Here

            StringBuffer endpointSb = new StringBuffer();
            StringBuffer sequenceSb = new StringBuffer();
            for (Object entryValue : globalEntriesMap.values()) {

                if (entryValue instanceof Endpoint) {
                    Endpoint endpoint = (Endpoint) entryValue;
                    String name = endpoint.getName();
                    if (name != null) {
                        endpointList.add(name);
                    }
                } else if (entryValue instanceof SequenceMediator) {
                    SequenceMediator sequenceMediator = (SequenceMediator) entryValue;
View Full Code Here

    public OMElement serialize(OMElement parent) {
        OMElement send = fac.createOMElement("send", synNS);
        saveTracingState(send, this);

        Endpoint activeEndpoint = getEndpoint();
        if (activeEndpoint != null) {
            send.addChild(EndpointSerializer.getElementFromEndpoint(activeEndpoint));
        }

        if (parent != null) {
View Full Code Here

        processAuditStatus(this, elem);

        OMElement epElement = elem.getFirstChildWithName(ENDPOINT_Q);
        if (epElement != null) {
            // create the endpoint and set it in the send medaitor
            Endpoint endpoint = EndpointFactory.getEndpointFromElement(epElement, true,
                    new Properties());
            if (endpoint != null) {
                setEndpoint(endpoint);
            }
        }
View Full Code Here

    private void sendToEndpoint(MessageContext synCtx) {
        if (target.getEndpoint() != null) {
            target.getEndpoint().send(synCtx);
        } else if (target.getEndpointRef() != null) {
            Endpoint epr = synCtx.getConfiguration().getEndpoint(target.getEndpointRef());
            if (epr != null) {
                epr.send(synCtx);
            }
        }
    }
View Full Code Here

    public String getEndpoint(String name) throws ProxyAdminException{
        String epXML = null;
        final Lock lock = getLock();
        try {
            lock.lock();
            Endpoint ep = getSynapseConfiguration().getDefinedEndpoints().get(name);
            epXML = EndpointSerializer.getElementFromEndpoint(ep).toString();
        } catch (Exception axisFault) {
            handleException(log, "No endpoint defined by the name: " + name, axisFault);
        } finally {
            lock.unlock();
View Full Code Here

        for (Target target : targets) {
            ManagedLifecycle seq = target.getSequence();
            if (seq != null) {
                seq.init(se);
            }
            Endpoint endpoint = target.getEndpoint();
            if (endpoint != null) {
                endpoint.init(se);
            }
        }
    }
View Full Code Here

        for (Target target : targets) {
            ManagedLifecycle seq = target.getSequence();
            if (seq != null) {
                seq.destroy();
            }
            Endpoint endpoint = target.getEndpoint();
            if (endpoint != null) {
                endpoint.destroy();
            }
        }
    }
View Full Code Here

        }

        endpointStates = new EndpointState[endpoints.size()];

        for (int i = 0; i < endpoints.size(); i++) {
            Endpoint endpoint = endpoints.get(i);
            if (!(endpoint instanceof PropertyInclude)) {
                EndpointState state = new EndpointState(i, DEFAULT_WEIGHT);
                endpointStates[i] = state;
            } else {
                MediatorProperty property =
View Full Code Here

TOP

Related Classes of org.apache.synapse.endpoints.Endpoint

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.