Examples of InternalEndpoint


Examples of org.apache.servicemix.jbi.servicedesc.InternalEndpoint

     * Registers a remote endpoint
     *
     * @param remote
     */
    public void registerRemoteEndpoint(InternalEndpoint remote) {
        InternalEndpoint endpoint = (InternalEndpoint) internalEndpoints.get(getKey(remote));
        // Create endpoint if not already existing
        if (endpoint == null) {
            endpoint = new InternalEndpoint(null, remote.getEndpointName(), remote.getServiceName());
            internalEndpoints.put(getKey(endpoint), endpoint);
        }
        // Add remote endpoint
        endpoint.addRemoteEndpoint(remote);
        fireEvent(remote, EndpointEvent.REMOTE_ENDPOINT_REGISTERED);
    }
View Full Code Here

Examples of org.apache.servicemix.jbi.servicedesc.InternalEndpoint

     *
     * @param remote
     */
    public void unregisterRemoteEndpoint(InternalEndpoint remote) {
        String key = getKey(remote);
        InternalEndpoint endpoint = (InternalEndpoint) internalEndpoints.get(key);
        if (endpoint != null) {
            endpoint.removeRemoteEndpoint(remote);
            if (!endpoint.isClustered() && !endpoint.isLocal()) {
                internalEndpoints.remove(key);
                unregisterEndpoint(endpoint);
            }
            fireEvent(remote, EndpointEvent.REMOTE_ENDPOINT_UNREGISTERED);
        }
View Full Code Here

Examples of org.apache.servicemix.jbi.servicedesc.InternalEndpoint

    protected boolean isContainerEmbedded() {
        return container.isEmbedded();
    }

    protected InternalEndpoint matchEndpointByName(ServiceEndpoint[] endpoints, String endpointName) {
        InternalEndpoint result = null;
        if (endpoints != null && endpointName != null && endpointName.length() > 0) {
            for (int i = 0; i < endpoints.length; i++) {
                if (endpoints[i].getEndpointName().equals(endpointName)) {
                    result = (InternalEndpoint) endpoints[i];
                    break;
View Full Code Here

Examples of org.apache.servicemix.jbi.servicedesc.InternalEndpoint

     * @param as
     */
    public void registerSubscriptions(ComponentContextImpl context, ActivationSpec as) {
        QName service = as.getService();
        String endpointName = as.getEndpoint();
        InternalEndpoint endpoint = new InternalEndpoint(context.getComponentNameSpace(), endpointName, service);
        SubscriptionSpec[] specs = as.getSubscriptions();
        if (specs != null) {
            for (int i = 0; i < specs.length; i++) {
                registerSubscription(context, specs[i], endpoint);
            }
View Full Code Here

Examples of org.apache.servicemix.jbi.servicedesc.InternalEndpoint

     * @param context
     * @param subscription
     * @param endpoint
     */
    public void registerSubscription(ComponentContextImpl context, SubscriptionSpec subscription, ServiceEndpoint endpoint) {
        InternalEndpoint sei = (InternalEndpoint)endpoint;
        subscription.setName(context.getComponentNameSpace());
        subscriptionRegistry.registerSubscription(subscription, sei);
    }
View Full Code Here

Examples of org.apache.servicemix.nmr.api.internal.InternalEndpoint

        // Intercept exchanges
        if (exchange instanceof InternalExchange
                && exchange.getStatus() == Status.Active && exchange.getRole() == Role.Consumer
                && exchange.getOut(false) == null && exchange.getFault(false) == null) {
            // Filter JBI endpoints
            InternalEndpoint source = ((InternalExchange) exchange).getSource();
            for (ClusterRegistration reg : getServices()) {
                if (reg.match(source)) {
                    exchange.setTarget(getChannel().getNMR().getEndpointRegistry().lookup(ServiceHelper.createMap(Endpoint.NAME, name)));
                    return;
                }
View Full Code Here

Examples of org.apache.servicemix.nmr.api.internal.InternalEndpoint

     * In an OSGi world, this would be performed automatically by a ServiceTracker.
     *
     * @param endpoint the endpoint to unregister
     */
    public void unregister(Endpoint endpoint, Map<String, ?> properties) {
        InternalEndpoint wrapper;
        if (endpoint instanceof InternalEndpoint) {
            wrapper = (InternalEndpoint) endpoint;
            if (wrapper != null) {
                endpoint = wrappers.remove(wrapper);
                if (endpoint != null) {
View Full Code Here

Examples of org.apache.servicemix.nmr.api.internal.InternalEndpoint

     *
     * @param endpoint the service for which to retrieve metadata
     * @return the metadata associated with the=is endpoint
     */
    public Map<String, ?> getProperties(Endpoint endpoint) {
        InternalEndpoint wrapper;
        if (endpoint instanceof InternalEndpoint) {
            wrapper = (InternalEndpoint) endpoint;
        } else {
            wrapper = endpoints.get(endpoint);
        }
View Full Code Here

Examples of org.apache.servicemix.nmr.api.internal.InternalEndpoint

        ServiceAssemblyImpl sa = createServiceAssembly();
       
        AssemblyReferencesListener listener = new AssemblyReferencesListener();
        listener.setAssembly(sa);
       
        InternalEndpoint endpoint = new InternalEndpointWrapper(new EndpointImpl(ServiceHelper.createMap(Endpoint.ENDPOINT_NAME, "endpoint")),
                                                                ServiceHelper.createMap(Endpoint.ENDPOINT_NAME, "internal-endpoint"));
        listener.endpointRegistered(endpoint);
        listener.setAssembly(null);
       
        InternalExchange exchange = new ExchangeImpl(Pattern.InOnly);
View Full Code Here

Examples of org.apache.servicemix.nmr.api.internal.InternalEndpoint

        ServiceAssemblyImpl sa = createServiceAssembly();
       
        AssemblyReferencesListener listener = new AssemblyReferencesListener();
        listener.setAssembly(sa);
       
        InternalEndpoint endpoint = new InternalEndpointWrapper(new EndpointImpl(ServiceHelper.createMap(Endpoint.ENDPOINT_NAME, "endpoint")),
                                                                ServiceHelper.createMap(Endpoint.ENDPOINT_NAME, "internal-endpoint"));
        listener.endpointRegistered(endpoint);
        listener.setAssembly(null);
       
        InternalExchange exchange = new ExchangeImpl(Pattern.InOnly);
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.