Author: davsclaus
Date: Mon Nov 23 08:16:24 2009
New Revision: 883270
URL: http://svn.apache.org/viewvc?rev=883270&view=rev
Log:
Polished description for @deprecated methods.
Modified:
camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java
camel/trunk/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
Modified:
camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java
URL:
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java?rev=883270&r1=883269&r2=883270&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java Mon
Nov 23 08:16:24 2009
@@ -63,7 +63,7 @@
*/
String getVersion();
- // Component Management Methods
+ // Service Methods
//-----------------------------------------------------------------------
/**
@@ -82,6 +82,9 @@
*/
boolean hasService(Object object);
+ // Component Management Methods
+ //-----------------------------------------------------------------------
+
/**
* Adds a component to the context.
*
@@ -146,9 +149,9 @@
//-----------------------------------------------------------------------
/**
- * Resolves the given URI to an {...@link Endpoint}. If the URI has a
singleton endpoint
- * registered, then the singleton is returned. Otherwise, a new {...@link
Endpoint} is created
- * and if the endpoint is a singleton it is registered as a singleton
endpoint.
+ * Resolves the given name to an {...@link Endpoint} of the specified type.
+ * If the name has a singleton endpoint registered, then the singleton is
returned.
+ * Otherwise, a new {...@link Endpoint} is created and registered.
*
* @param uri the URI of the endpoint
* @return the endpoint
@@ -158,8 +161,7 @@
/**
* Resolves the given name to an {...@link Endpoint} of the specified type.
* If the name has a singleton endpoint registered, then the singleton is
returned.
- * Otherwise, a new {...@link Endpoint} is created and if the endpoint is a
- * singleton it is registered as a singleton endpoint.
+ * Otherwise, a new {...@link Endpoint} is created and registered.
*
* @param name the name of the endpoint
* @param endpointType the expected type
@@ -196,7 +198,7 @@
*
* @param uri the URI of the endpoints
* @return collection of endpoints
- * @deprecated makes no sense, is removed in Camel 2.2
+ * @deprecated not used will be removed in Camel 2.2.
*/
@Deprecated
Collection<Endpoint> getEndpoints(String uri);
@@ -205,7 +207,9 @@
* Returns the collection of all registered singleton endpoints.
*
* @return all the singleton endpoints
+ * @deprecated not used will be removed in Camel 2.2.
*/
+ @Deprecated
Collection<Endpoint> getSingletonEndpoints();
/**
@@ -213,10 +217,8 @@
*
* @param uri the URI to be used to resolve this endpoint
* @param endpoint the endpoint to be added to the context
- * @return the old endpoint that was previously registered to the context
if
- * there was already an singleton endpoint for that URI or null
- * @throws Exception if the new endpoint could not be started or the old
- * singleton endpoint could not be stopped
+ * @return the old endpoint that was previously registered or
<tt>null</tt> if none was registered
+ * @throws Exception if the new endpoint could not be started or the old
endpoint could not be stopped
*/
Endpoint addEndpoint(String uri, Endpoint endpoint) throws Exception;
@@ -226,7 +228,7 @@
* @param uri the URI to be used to remove
* @return a collection of endpoints removed or null if there are no
endpoints for this URI
* @throws Exception if at least one endpoint could not be stopped
- * @deprecated makes no sense, is removed in Camel 2.2
+ * @deprecated not used will be removed in Camel 2.2.
*/
@Deprecated
Collection<Endpoint> removeEndpoints(String uri) throws Exception;
Modified:
camel/trunk/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
URL:
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java?rev=883270&r1=883269&r2=883270&view=diff
==============================================================================
---
camel/trunk/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
(original)
+++
camel/trunk/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
Mon Nov 23 08:16:24 2009
@@ -142,7 +142,7 @@
*/
public static void assertIsSatisfied(CamelContext context) throws
InterruptedException {
ObjectHelper.notNull(context, "camelContext");
- Collection<Endpoint> endpoints = context.getSingletonEndpoints();
+ Collection<Endpoint> endpoints = context.getEndpoints();
for (Endpoint endpoint : endpoints) {
if (endpoint instanceof MockEndpoint) {
MockEndpoint mockEndpoint = (MockEndpoint) endpoint;