You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ge...@apache.org on 2008/08/29 13:23:22 UTC
svn commit: r690190 - in /servicemix/smx3/trunk/core/servicemix-core/src:
main/java/org/apache/servicemix/ main/java/org/apache/servicemix/client/
main/java/org/apache/servicemix/jbi/container/
main/java/org/apache/servicemix/jbi/nmr/ main/java/org/apa...
Author: gertv
Date: Fri Aug 29 04:23:22 2008
New Revision: 690190
URL: http://svn.apache.org/viewvc?rev=690190&view=rev
Log:
SM-1455: Deprecating interfaces that were moved to servicemix-utils
Modified:
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/MessageExchangeListener.java
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/ClientFactory.java
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/DefaultServiceMixClient.java
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/Destination.java
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/ServiceMixClient.java
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/ServiceMixClientFacade.java
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/ActivationSpec.java
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/DefaultBroker.java
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/resolver/EndpointFilter.java
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/resolver/EndpointResolver.java
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/resolver/EndpointResolverSupport.java
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/SenderComponent.java
servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/ClientDestinationTest.java
servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/ClientFactoryTest.java
servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/ServiceMixClientTest.java
Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/MessageExchangeListener.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/MessageExchangeListener.java?rev=690190&r1=690189&r2=690190&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/MessageExchangeListener.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/MessageExchangeListener.java Fri Aug 29 04:23:22 2008
@@ -16,9 +16,6 @@
*/
package org.apache.servicemix;
-import javax.jbi.messaging.MessageExchange;
-import javax.jbi.messaging.MessagingException;
-
/**
* If a Component implements this interface, MessageExchange will be delivered directly to the listener
* asynchronously rather than using the usual asynchronous delivery with a thread used up per consuming
@@ -29,12 +26,4 @@
*/
public interface MessageExchangeListener extends org.apache.servicemix.jbi.listener.MessageExchangeListener {
- /**
- * MessageExchange passed directly to the listener instead of being queued
- *
- * @param exchange
- * @throws MessagingException
- */
- void onMessageExchange(MessageExchange exchange) throws MessagingException;
-
}
Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/ClientFactory.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/ClientFactory.java?rev=690190&r1=690189&r2=690190&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/ClientFactory.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/ClientFactory.java Fri Aug 29 04:23:22 2008
@@ -23,15 +23,11 @@
* An implementation should be bound in the JNDI context
*
* @author <a href="mailto:gnodet [at] apache.org">Guillaume Nodet</a>
+ * @deprecated
*/
-public interface ClientFactory {
+public interface ClientFactory extends org.apache.servicemix.jbi.api.ClientFactory {
/**
- * Default location to where the object should be looked for in JNDI
- */
- String DEFAULT_JNDI_NAME = "java:comp/env/jbi/ClientFactory";
-
- /**
* Create a new client to interact with the JBI bus
*
* @return a client
Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/DefaultServiceMixClient.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/DefaultServiceMixClient.java?rev=690190&r1=690189&r2=690190&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/DefaultServiceMixClient.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/DefaultServiceMixClient.java Fri Aug 29 04:23:22 2008
@@ -39,12 +39,13 @@
import org.apache.servicemix.components.util.ComponentSupport;
import org.apache.servicemix.jbi.FaultException;
import org.apache.servicemix.jbi.NoOutMessageAvailableException;
+import org.apache.servicemix.jbi.api.EndpointResolver;
+import org.apache.servicemix.jbi.api.Message;
import org.apache.servicemix.jbi.container.ActivationSpec;
import org.apache.servicemix.jbi.container.JBIContainer;
import org.apache.servicemix.jbi.messaging.DefaultMarshaler;
import org.apache.servicemix.jbi.messaging.PojoMarshaler;
import org.apache.servicemix.jbi.resolver.EndpointFilter;
-import org.apache.servicemix.jbi.resolver.EndpointResolver;
import org.apache.servicemix.jbi.resolver.ExternalInterfaceNameEndpointResolver;
import org.apache.servicemix.jbi.resolver.ExternalServiceNameEndpointResolver;
import org.apache.servicemix.jbi.resolver.InterfaceNameEndpointResolver;
Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/Destination.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/Destination.java?rev=690190&r1=690189&r2=690190&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/Destination.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/Destination.java Fri Aug 29 04:23:22 2008
@@ -27,7 +27,7 @@
*
* @version $Revision: $
*/
-public interface Destination {
+public interface Destination extends org.apache.servicemix.jbi.api.Destination {
/**
* Creates an {@link InOnly} (one way) message exchange.
Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/ServiceMixClient.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/ServiceMixClient.java?rev=690190&r1=690189&r2=690190&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/ServiceMixClient.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/ServiceMixClient.java Fri Aug 29 04:23:22 2008
@@ -16,24 +16,6 @@
*/
package org.apache.servicemix.client;
-import java.util.Map;
-
-import javax.jbi.JBIException;
-import javax.jbi.component.ComponentContext;
-import javax.jbi.messaging.DeliveryChannel;
-import javax.jbi.messaging.Fault;
-import javax.jbi.messaging.InOnly;
-import javax.jbi.messaging.InOptionalOut;
-import javax.jbi.messaging.InOut;
-import javax.jbi.messaging.MessageExchange;
-import javax.jbi.messaging.MessageExchangeFactory;
-import javax.jbi.messaging.MessagingException;
-import javax.jbi.messaging.RobustInOnly;
-import javax.jbi.servicedesc.ServiceEndpoint;
-import javax.xml.namespace.QName;
-
-import org.apache.servicemix.jbi.resolver.EndpointResolver;
-
/**
* Represents a client API which allows users to programatically send messages into the JBI
* container or to receive them using the regular JBI API together with a collection of helper methods making it
@@ -41,329 +23,7 @@
*
* @version $Revision$
*/
-public interface ServiceMixClient {
-
-
- // Core JBI methods
- //-------------------------------------------------------------------------
-
- /**
- * Sends the message exchange to the endpoint.
- *
- * @param exchange
- * @throws MessagingException
- */
- void send(MessageExchange exchange) throws MessagingException;
-
- /**
- * Sends an In-Only message
- *
- * @param message
- */
- void send(Message message) throws MessagingException;
-
- /**
- * Sends the message exchange to the endpoint, blocking until the send has completed.
- *
- * @param exchange
- * @throws MessagingException
- * @return true if the exchange has been processed and returned by the
- * servicing component, false otherwise.
- */
- boolean sendSync(MessageExchange exchange) throws MessagingException;
-
- /**
- * Sends the message exchange to the endpoint, blocking until the send has completed
- * or the specified timeout has elapsed.
- *
- * @param exchange
- * @param timeout
- * @throws MessagingException
- * @return true if the exchange has been processed and returned by the
- * servicing component, false otherwise.
- */
- boolean sendSync(MessageExchange exchange, long timeout) throws MessagingException;
-
- /**
- * Receives an inbound message exchange, blocking forever until one is available.
- *
- * @return the received message exchange
- * @throws MessagingException
- */
- MessageExchange receive() throws MessagingException;
-
- /**
- * Receives an inbound message exchange, blocking until the given timeout period.
- *
- * @param timeout the maximum amount of time to wait for a message
- * @return the received message exchange or null if the timeout occurred.
- * @throws MessagingException
- */
- MessageExchange receive(long timeout) throws MessagingException;
-
-
- /**
- * Performs a request-response (using an {@link InOut} to the endpoint denoted by the given resolver,
- * blocking until the response is received and then returning the result.
- *
- * @param resolver the resolver used to resolve and choose the endpoint, which if null is used
- * then the container configured routing rules are used to dispatch the message to the destination
- * @param exchangeProperties the properties used for the exchange or null if no properties are required
- * @param inMessageProperties the properties used for the in message or null if no properties are required
- * @param content the body of the message
- * @throws JBIException if the message could not be dispatched for some reason.
- */
- Object request(EndpointResolver resolver, Map exchangeProperties, Map inMessageProperties, Object content) throws JBIException;
-
- /**
- * Sends a one way message exchange to the endpoint denoted by the given resolver
- *
- * @param resolver the resolver used to resolve and choose the endpoint, which if null is used
- * then the container configured routing rules are used to dispatch the message to the destination
- * @param exchangeProperties the properties used for the exchange or null if no properties are required
- * @param inMessageProperties the properties used for the in message or null if no properties are required
- * @param content the body of the message
- * @throws JBIException if the message could not be dispatched for some reason.
- */
- void send(EndpointResolver resolver, Map exchangeProperties, Map inMessageProperties, Object content) throws JBIException;
-
- /**
- * Sends a one way message exchange to the endpoint denoted by the given resolver and blocks until the send is completed.
- *
- * @param resolver the resolver used to resolve and choose the endpoint, which if null is used
- * then the container configured routing rules are used to dispatch the message to the destination
- * @param exchangeProperties the properties used for the exchange or null if no properties are required
- * @param inMessageProperties the properties used for the in message or null if no properties are required
- * @param content the body of the message
- * @return true if the exchange has been processed and returned by the
- * servicing component, false otherwise.
- * @throws JBIException if the message could not be dispatched for some reason.
- */
- boolean sendSync(EndpointResolver resolver, Map exchangeProperties, Map inMessageProperties, Object content) throws JBIException;
-
-
- /**
- * Performs a request-response (using an {@link InOut} to the endpoint denoted by the given resolver,
- * blocking until the response is received and then returning the result.
- *
- * @param inMessageProperties the properties used for the in message or null if no properties are required
- * @param content the body of the message
- * @throws JBIException if the message could not be dispatched for some reason.
- */
- Object request(Map inMessageProperties, Object content) throws JBIException;
-
- /**
- * Sends a one way message exchange to the endpoint denoted by the given resolver
- *
- * @param inMessageProperties the properties used for the in message or null if no properties are required
- * @param content the body of the message
- * @throws JBIException if the message could not be dispatched for some reason.
- */
- void send(Map inMessageProperties, Object content) throws JBIException;
-
- /**
- * Sends a one way message exchange to the endpoint denoted by the given resolver and blocks until the send is completed.
- *
- * @param inMessageProperties the properties used for the in message or null if no properties are required
- * @param content the body of the message
- * @return true if the exchange has been processed and returned by the
- * servicing component, false otherwise.
- * @throws JBIException if the message could not be dispatched for some reason.
- */
- boolean sendSync(Map inMessageProperties, Object content) throws JBIException;
-
-
-
- // Factory methods to make MessageExchange instances
- //-------------------------------------------------------------------------
-
- /**
- * Creates an {@link InOnly} (one way) message exchange.
- *
- * @return the newly created message exchange
- * @throws MessagingException
- */
- InOnly createInOnlyExchange() throws MessagingException;
-
- /**
- * Creates an {@link InOnly} (one way) message exchange with the given resolver.
- *
- * @return the newly created message exchange
- * @throws MessagingException
- */
- InOnly createInOnlyExchange(EndpointResolver resolver) throws JBIException;
-
- /**
- * Creates an {@link InOut} (request-reply) message exchange.
- *
- * @return the newly created message exchange
- * @throws MessagingException
- */
- InOut createInOutExchange() throws MessagingException;
-
- /**
- * Creates an {@link InOut} (request-reply) message exchange with the given resolver.
- *
- * @return the newly created message exchange
- * @throws MessagingException
- */
- InOut createInOutExchange(EndpointResolver resolver) throws JBIException;
-
- /**
- * Creates an {@link InOptionalOut} (optional request-reply) message exchange.
- *
- * @return the newly created message exchange
- * @throws MessagingException
- */
- InOptionalOut createInOptionalOutExchange() throws MessagingException;
-
- /**
- * Creates an {@link InOptionalOut} (optional request-reply) message exchange with the given resolver.
- *
- * @return the newly created message exchange
- * @throws MessagingException
- */
- InOptionalOut createInOptionalOutExchange(EndpointResolver resolver) throws JBIException;
-
- /**
- * Creates an {@link RobustInOnly} (one way) message exchange.
- *
- * @return the newly created message exchange
- * @throws MessagingException
- */
- RobustInOnly createRobustInOnlyExchange() throws MessagingException;
-
- /**
- * Creates an {@link RobustInOnly} (one way) message exchange with the given resolver.
- *
- * @return the newly created message exchange
- * @throws MessagingException
- */
- RobustInOnly createRobustInOnlyExchange(EndpointResolver resolver) throws JBIException;
-
-
-
-
- /**
- * Resolves a WS-Addressing endpoint reference String into a JBI {@link javax.jbi.servicedesc.ServiceEndpoint}
- * reference so that message exchanges can be directed to an endpoint
- *
- * @param uri the WS-Addressing endpoint reference string
- */
- ServiceEndpoint resolveEndpointReference(String uri);
-
-
- // Helper methods to get an endpoint resolver
- //-------------------------------------------------------------------------
-
- /**
- * Creates an endpoint resolver for the given service name
- *
- * @param service
- * @return the newly created entity resolver
- */
- EndpointResolver createResolverForService(QName service);
-
- /**
- * Creates an endpoint resolver for the given interface name
- *
- * @param interfaceName
- * @return the newly created entity resolver
- */
- EndpointResolver createResolverInterface(QName interfaceName);
-
- /**
- * Creates an endpoint for the given external service name
- *
- * @param service
- * @return the newly created entity resolver
- */
- EndpointResolver createResolverForExternalService(QName service);
-
- /**
- * Creates an endpoint for the given external interface
- *
- * @param interfaceName
- * @return the newly created entity resolver
- */
- EndpointResolver createResolverForExternalInterface(QName interfaceName);
-
- /**
- * Creates an endpoint resolver for the given service and endpoint name
- *
- * @param service
- * @param endpoint
- * @return the newly created entity resolver
- */
- EndpointResolver createResolverForExternalInterface(QName service, String endpoint);
-
-
- // Create a destination
- //-------------------------------------------------------------------------
-
- /**
- * Creates a destination which represents some JBI endpoint that message exchanges can be created with.
- * @throws MessagingException
- */
- Destination createDestination(String uri) throws MessagingException;
-
-
- // Helper methods and access to the JBI context information
- //-------------------------------------------------------------------------
-
-
- /**
- * A helper method to indicate that the message exchange is complete
- * which will set the status to {@link ExchangeStatus#DONE} and send the message
- * on the delivery channel.
- *
- * @param exchange
- * @throws MessagingException
- */
- void done(MessageExchange exchange) throws MessagingException;
-
- /**
- * A helper method which fails and completes the given exchange with the specified fault
- */
- void fail(MessageExchange exchange, Fault fault) throws MessagingException;
-
- /**
- * A helper method which fails and completes the given exchange with the specified exception
- */
- void fail(MessageExchange exchange, Exception error) throws MessagingException;
-
-
- /**
- * Returns the current component context which can be used to activate endpoints, components and
- * query the available service endpoints.
- *
- * @return the component context
- */
- ComponentContext getContext();
-
- /**
- * Returns the delivery channel for this client's message exchanges
- *
- * @return the delivery channel on which all this clients exchanges will occur.
- * @throws MessagingException
- */
- DeliveryChannel getDeliveryChannel() throws MessagingException;
-
- /**
- * Returns the default message exchange factory.
- *
- * @return the default message exchange factory.
- * @throws MessagingException
- */
- MessageExchangeFactory getExchangeFactory() throws MessagingException;
-
-
- /**
- * Close this client.
- *
- * @throws JBIException
- */
- void close() throws JBIException;
+public interface ServiceMixClient extends org.apache.servicemix.jbi.api.ServiceMixClient {
}
Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/ServiceMixClientFacade.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/ServiceMixClientFacade.java?rev=690190&r1=690189&r2=690190&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/ServiceMixClientFacade.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/client/ServiceMixClientFacade.java Fri Aug 29 04:23:22 2008
@@ -39,12 +39,13 @@
import org.apache.servicemix.jbi.FaultException;
import org.apache.servicemix.jbi.NoOutMessageAvailableException;
+import org.apache.servicemix.jbi.api.EndpointResolver;
+import org.apache.servicemix.jbi.api.Message;
import org.apache.servicemix.jbi.container.ActivationSpec;
import org.apache.servicemix.jbi.container.JBIContainer;
import org.apache.servicemix.jbi.messaging.DefaultMarshaler;
import org.apache.servicemix.jbi.messaging.PojoMarshaler;
import org.apache.servicemix.jbi.resolver.EndpointFilter;
-import org.apache.servicemix.jbi.resolver.EndpointResolver;
import org.apache.servicemix.jbi.resolver.ExternalInterfaceNameEndpointResolver;
import org.apache.servicemix.jbi.resolver.ExternalServiceNameEndpointResolver;
import org.apache.servicemix.jbi.resolver.InterfaceNameEndpointResolver;
Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/ActivationSpec.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/ActivationSpec.java?rev=690190&r1=690189&r2=690190&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/ActivationSpec.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/ActivationSpec.java Fri Aug 29 04:23:22 2008
@@ -20,9 +20,9 @@
import javax.xml.namespace.QName;
+import org.apache.servicemix.jbi.api.EndpointResolver;
import org.apache.servicemix.jbi.messaging.PojoMarshaler;
import org.apache.servicemix.jbi.resolver.EndpointChooser;
-import org.apache.servicemix.jbi.resolver.EndpointResolver;
import org.apache.servicemix.jbi.resolver.InterfaceNameEndpointResolver;
import org.apache.servicemix.jbi.resolver.ServiceAndEndpointNameResolver;
import org.apache.servicemix.jbi.resolver.ServiceNameEndpointResolver;
Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java?rev=690190&r1=690189&r2=690190&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java Fri Aug 29 04:23:22 2008
@@ -57,6 +57,7 @@
import org.apache.servicemix.executors.ExecutorFactory;
import org.apache.servicemix.executors.impl.ExecutorFactoryImpl;
import org.apache.servicemix.id.IdGenerator;
+import org.apache.servicemix.jbi.api.Container;
import org.apache.servicemix.jbi.event.ComponentListener;
import org.apache.servicemix.jbi.event.ContainerAware;
import org.apache.servicemix.jbi.event.DeploymentListener;
@@ -87,7 +88,7 @@
*
* @version $Revision$
*/
-public class JBIContainer extends BaseLifeCycle {
+public class JBIContainer extends BaseLifeCycle implements Container {
/**
* Default Container name - must be unique if used in a cluster
*/
Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/DefaultBroker.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/DefaultBroker.java?rev=690190&r1=690189&r2=690190&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/DefaultBroker.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/DefaultBroker.java Fri Aug 29 04:23:22 2008
@@ -31,6 +31,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.servicemix.jbi.api.EndpointResolver;
import org.apache.servicemix.jbi.container.ActivationSpec;
import org.apache.servicemix.jbi.container.JBIContainer;
import org.apache.servicemix.jbi.framework.ComponentContextImpl;
@@ -48,7 +49,6 @@
import org.apache.servicemix.jbi.resolver.ConsumerComponentEndpointFilter;
import org.apache.servicemix.jbi.resolver.EndpointChooser;
import org.apache.servicemix.jbi.resolver.EndpointFilter;
-import org.apache.servicemix.jbi.resolver.EndpointResolver;
import org.apache.servicemix.jbi.resolver.FirstChoicePolicy;
import org.apache.servicemix.jbi.resolver.ProducerComponentEndpointFilter;
import org.apache.servicemix.jbi.servicedesc.AbstractServiceEndpoint;
Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/resolver/EndpointFilter.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/resolver/EndpointFilter.java?rev=690190&r1=690189&r2=690190&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/resolver/EndpointFilter.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/resolver/EndpointFilter.java Fri Aug 29 04:23:22 2008
@@ -16,20 +16,13 @@
*/
package org.apache.servicemix.jbi.resolver;
-import javax.jbi.messaging.MessageExchange;
-import javax.jbi.servicedesc.ServiceEndpoint;
/**
* Represents a filter used to exclude endpoints before choosing which endpoint to use
*
* @version $Revision$
+ * @deprecated
*/
-public interface EndpointFilter {
-
- /**
- * Performs the filter on the endpoint returning true if the endpoint is suitable, based on some
- * capabilities evaluation or false if the endpoint should be ignored.
- */
- boolean evaluate(ServiceEndpoint endpoint, MessageExchange exchange);
+public interface EndpointFilter extends org.apache.servicemix.jbi.api.EndpointFilter {
}
Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/resolver/EndpointResolver.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/resolver/EndpointResolver.java?rev=690190&r1=690189&r2=690190&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/resolver/EndpointResolver.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/resolver/EndpointResolver.java Fri Aug 29 04:23:22 2008
@@ -16,34 +16,13 @@
*/
package org.apache.servicemix.jbi.resolver;
-import javax.jbi.JBIException;
-import javax.jbi.component.ComponentContext;
-import javax.jbi.messaging.MessageExchange;
-import javax.jbi.servicedesc.ServiceEndpoint;
-
/**
* A Strategy pattern which can be used to plug in different {@link ServiceEndpoint} resolving policies from static
* relationships to dynamic resolution of the endpoint used based on some policy.
*
* @version $Revision$
+ * @deprecated
*/
-public interface EndpointResolver {
-
- /**
- * Resolves the endpoint which should be used for the given message exchange
- * using either a hard coded endpoint or some policy which chooses the endpoint
- * dynamically using some algorithm.
- *
- * @param context is the component context
- * @param exchange the message exchange which the endpoint will be used for which may
- * contain some state to help choose the algorithm.
- * @param filter the filter to be applied to the available endpoints
- * @return the chosen endpoint or null if no endpoint could be found.
- */
- ServiceEndpoint resolveEndpoint(ComponentContext context, MessageExchange exchange, EndpointFilter filter) throws JBIException;
+public interface EndpointResolver extends org.apache.servicemix.jbi.api.EndpointResolver {
- /**
- * Resolves all the available endpoints which may not be applicable to a component.
- */
- ServiceEndpoint[] resolveAvailableEndpoints(ComponentContext context, MessageExchange exchange) throws JBIException;
}
Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/resolver/EndpointResolverSupport.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/resolver/EndpointResolverSupport.java?rev=690190&r1=690189&r2=690190&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/resolver/EndpointResolverSupport.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/resolver/EndpointResolverSupport.java Fri Aug 29 04:23:22 2008
@@ -21,6 +21,8 @@
import javax.jbi.messaging.MessageExchange;
import javax.jbi.servicedesc.ServiceEndpoint;
+import org.apache.servicemix.jbi.api.EndpointFilter;
+
/**
* A useful base class for {@link EndpointResolver} implementations.
*
Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/SenderComponent.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/SenderComponent.java?rev=690190&r1=690189&r2=690190&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/SenderComponent.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/SenderComponent.java Fri Aug 29 04:23:22 2008
@@ -25,8 +25,8 @@
import javax.xml.namespace.QName;
import org.apache.servicemix.components.util.ComponentSupport;
+import org.apache.servicemix.jbi.api.EndpointResolver;
import org.apache.servicemix.jbi.jaxp.StringSource;
-import org.apache.servicemix.jbi.resolver.EndpointResolver;
import org.apache.servicemix.jbi.resolver.NullEndpointFilter;
/**
Modified: servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/ClientDestinationTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/ClientDestinationTest.java?rev=690190&r1=690189&r2=690190&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/ClientDestinationTest.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/ClientDestinationTest.java Fri Aug 29 04:23:22 2008
@@ -28,6 +28,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.servicemix.jbi.api.Destination;
+import org.apache.servicemix.jbi.api.Message;
import org.apache.servicemix.jbi.container.SpringJBIContainer;
import org.apache.servicemix.tck.MessageList;
import org.apache.servicemix.tck.Receiver;
Modified: servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/ClientFactoryTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/ClientFactoryTest.java?rev=690190&r1=690189&r2=690190&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/ClientFactoryTest.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/ClientFactoryTest.java Fri Aug 29 04:23:22 2008
@@ -23,6 +23,7 @@
import junit.framework.TestCase;
import org.apache.servicemix.components.util.EchoComponent;
+import org.apache.servicemix.jbi.api.Destination;
import org.apache.servicemix.jbi.container.ActivationSpec;
import org.apache.servicemix.jbi.container.JBIContainer;
import org.apache.servicemix.jbi.jaxp.StringSource;
Modified: servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/ServiceMixClientTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/ServiceMixClientTest.java?rev=690190&r1=690189&r2=690190&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/ServiceMixClientTest.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/ServiceMixClientTest.java Fri Aug 29 04:23:22 2008
@@ -32,9 +32,9 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.servicemix.jbi.api.EndpointResolver;
import org.apache.servicemix.jbi.container.SpringJBIContainer;
import org.apache.servicemix.jbi.jaxp.SourceTransformer;
-import org.apache.servicemix.jbi.resolver.EndpointResolver;
import org.apache.servicemix.tck.Receiver;
import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
import org.springframework.context.support.AbstractXmlApplicationContext;