Package org.apache.servicemix.nmr.api.internal

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


    public Iterable<InternalEndpoint> choose(EndpointRegistry registry) {
        List<InternalEndpoint> result = matches;
        if (result == null || this.registry != registry) {
            result = new ArrayList<InternalEndpoint>();
            for (Endpoint ep : registry.query(null)) {
                InternalEndpoint iep = (InternalEndpoint) ep;
                if (Boolean.valueOf((String) iep.getMetaData().get(Endpoint.UNTARGETABLE))) {
                    continue;
                }
                if (match(registry, iep)) {
                    result.add(iep);
                }
View Full Code Here


    public synchronized Iterable<InternalEndpoint> choose(EndpointRegistry registry) {
        List<InternalEndpoint> result = matches;
        if (result == null || this.registry != registry) {
            result = new ArrayList<InternalEndpoint>();
            for (Endpoint ep : registry.query(null)) {
                InternalEndpoint iep = (InternalEndpoint) ep;
                if (Boolean.valueOf((String) iep.getMetaData().get(Endpoint.UNTARGETABLE))) {
                    continue;
                }
                if (filter.match(iep)) {
                    result.add(iep);
                }
View Full Code Here

    public synchronized Iterable<InternalEndpoint> choose() {
        if (this.matches == null) {
            List<InternalEndpoint> eps = new ArrayList<InternalEndpoint>();
            for (Endpoint ep : registry.query((Map<String, ?>) null)) {
                InternalEndpoint iep = (InternalEndpoint) ep;
                if (filter.match(iep)) {
                    eps.add(iep);
                }
            }
            this.matches = eps;
View Full Code Here

     * 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;
            endpoint = wrappers.remove(wrapper);
            endpoints.remove(endpoint);
        } else {
View Full Code Here

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

        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

        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

        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

        assertEquals(Status.Error, exchange.getStatus());
    }

    public void testNoExceptionsOnUnknownExchange() throws Exception {
        AssemblyReferencesListener listener = new AssemblyReferencesListener();
        InternalEndpoint endpoint = new InternalEndpointWrapper(new EndpointImpl(ServiceHelper.createMap(Endpoint.ENDPOINT_NAME, "endpoint")),
                                                                ServiceHelper.createMap(Endpoint.ENDPOINT_NAME, "internal-endpoint"));
       
        InternalExchange exchange = new ExchangeImpl(Pattern.InOnly);
        exchange.setSource(endpoint);
        exchange.setProperty(DeliveryChannelImpl.SEND_SYNC, Boolean.TRUE);
View Full Code Here

    }

    private void doTestManageManagedEndpoint(Exception ex) throws Exception {
        ObjectName name = new ObjectName(ENDPOINT_NAME);
        ObjectInstance instance = new ObjectInstance(name, Nameable.class.getName());
        InternalEndpoint internal = control.createMock(InternalEndpoint.class);
        ManagedEndpoint endpoint =
            new ManagedEndpoint(internal, strategy);
        expect(internal.getId()).andReturn("endpoint_foo");
        expect(mbeanServer.registerMBean(isA(ManagedEndpoint.class), eq(name))).andReturn(instance);
        control.replay();
        strategy.manageObject(endpoint);
        strategy.manageObject(endpoint);
        control.verify();
View Full Code Here

TOP

Related Classes of org.apache.servicemix.nmr.api.internal.InternalEndpoint

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.