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/07 15:12:36 UTC
svn commit: r683609 - in
/servicemix/components/shared-libraries/trunk/servicemix-common: pom.xml
src/main/java/org/apache/servicemix/common/Endpoint.java
src/main/java/org/apache/servicemix/common/endpoints/ConsumerEndpoint.java
Author: gertv
Date: Thu Aug 7 06:12:36 2008
New Revision: 683609
URL: http://svn.apache.org/viewvc?rev=683609&view=rev
Log:
SM-1494: Include servicemix-common docs in generated docs
Modified:
servicemix/components/shared-libraries/trunk/servicemix-common/pom.xml
servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/Endpoint.java
servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ConsumerEndpoint.java
Modified: servicemix/components/shared-libraries/trunk/servicemix-common/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/components/shared-libraries/trunk/servicemix-common/pom.xml?rev=683609&r1=683608&r2=683609&view=diff
==============================================================================
--- servicemix/components/shared-libraries/trunk/servicemix-common/pom.xml (original)
+++ servicemix/components/shared-libraries/trunk/servicemix-common/pom.xml Thu Aug 7 06:12:36 2008
@@ -159,6 +159,20 @@
</excludes>
</configuration>
</plugin>
+ <!-- include maven source plugin on non-release builds to get documentation generated on SNAPSHOTs -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
Modified: servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/Endpoint.java
URL: http://svn.apache.org/viewvc/servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/Endpoint.java?rev=683609&r1=683608&r2=683609&view=diff
==============================================================================
--- servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/Endpoint.java (original)
+++ servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/Endpoint.java Thu Aug 7 06:12:36 2008
@@ -36,17 +36,17 @@
protected ServiceUnit serviceUnit;
protected Log logger;
private String key;
-
+
public Endpoint() {
}
-
+
public Endpoint(ServiceUnit serviceUnit, QName service, String endpoint) {
this.serviceUnit = serviceUnit;
this.logger = serviceUnit.getComponent().getLogger();
this.service = service;
this.endpoint = endpoint;
}
-
+
/**
* @return Returns the endpoint.
*/
@@ -56,14 +56,15 @@
/**
* Sets the name of the endpoint.
- *
- * @param endpoint a string specifiying the name of the endpoint
+ *
+ * @param endpoint a string specifiying the name of the endpoint
* @org.apache.xbean.Property description="the name of the endpoint"
*/
public void setEndpoint(String endpoint) {
this.endpoint = endpoint;
this.key = null;
}
+
/**
* @return Returns the service.
*/
@@ -73,20 +74,20 @@
/**
* Sets the name of the service the endpoint exposes.
- *
- * @param service a QName specifiying the name of the service
+ *
+ * @param service a QName specifiying the name of the service
* @org.apache.xbean.Property description="the QName of the service exposed by the endpoint"
*/
public void setService(QName service) {
this.service = service;
this.key = null;
}
-
+
/**
* @return Returns the role.
*/
public abstract Role getRole();
-
+
/**
* @return Returns the description.
*/
@@ -95,16 +96,16 @@
}
/**
- * Associates an XML document with the endpoint. The XML document describes
- * the endpoint and is typically found in the service unit packaging.
- *
- * @param description a <code>Document</code> describing the endpoint
+ * Associates an XML document with the endpoint. The XML document describes the endpoint and is typically found in the service
+ * unit packaging.
+ *
+ * @param description a <code>Document</code> describing the endpoint
* @org.apache.xbean.Property description="an XML document describing the endpoint"
*/
public void setDescription(Document description) {
this.description = description;
}
-
+
/**
* @return Returns the interfaceName.
*/
@@ -114,13 +115,14 @@
/**
* Sets the QName of the interface exposed by the endpoint.
- *
- * @param interfaceName a QName specifiying the name of the interface
+ *
+ * @param interfaceName a QName specifiying the name of the interface
* @org.apache.xbean.Property description="the QName of the interface exposed by the endpoint"
*/
public void setInterfaceName(QName interfaceName) {
this.interfaceName = interfaceName;
}
+
/**
* @return Returns the serviceUnit.
*/
@@ -129,11 +131,9 @@
}
/**
- * Associates an endpoint with a service unit. The service unit is used by
- * the container to manage the endpoint's lifecycle.
- *
- * @param serviceUnit a <code>ServiceUnit</code> to which the endpoint
- * will be associated
+ * Associates an endpoint with a service unit. The service unit is used by the container to manage the endpoint's lifecycle.
+ *
+ * @param serviceUnit a <code>ServiceUnit</code> to which the endpoint will be associated
* @org.apache.xbean.Property description="the service unit responsible for the endpoint"
*/
public void setServiceUnit(ServiceUnit serviceUnit) {
@@ -142,7 +142,7 @@
}
public boolean isExchangeOkay(MessageExchange exchange) {
- // TODO: We could check the MEP here
+ // TODO: We could check the MEP here
return true;
}
@@ -151,15 +151,14 @@
}
public abstract void activate() throws Exception;
-
+
public abstract void deactivate() throws Exception;
public abstract ExchangeProcessor getProcessor();
-
+
public String toString() {
- return "Endpoint[service: " + service + ", " +
- "endpoint: " + endpoint + ", " +
- "role: " + (getRole() == Role.PROVIDER ? "provider" : "consumer") + "]";
+ return "Endpoint[service: " + service + ", " + "endpoint: " + endpoint + ", " + "role: "
+ + (getRole() == Role.PROVIDER ? "provider" : "consumer") + "]";
}
/**
@@ -169,7 +168,7 @@
*/
public void validate() throws DeploymentException {
}
-
+
public Definition getDefinition() {
return definition;
}
@@ -177,7 +176,7 @@
public void setDefinition(Definition definition) {
this.definition = definition;
}
-
+
String getKey() {
if (key == null) {
if (service == null) {
Modified: servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ConsumerEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ConsumerEndpoint.java?rev=683609&r1=683608&r2=683609&view=diff
==============================================================================
--- servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ConsumerEndpoint.java (original)
+++ servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ConsumerEndpoint.java Thu Aug 7 06:12:36 2008
@@ -37,7 +37,7 @@
private String targetEndpoint;
private QName targetOperation;
private String targetUri;
-
+
public ConsumerEndpoint() {
}
@@ -56,11 +56,8 @@
public synchronized void start() throws Exception {
ServiceMixComponent component = getServiceUnit().getComponent();
ComponentContext ctx = component.getComponentContext();
- activated = new ExternalEndpoint(component.getEPRElementName(),
- getLocationURI(),
- getService(),
- getEndpoint(),
- getInterfaceName());
+ activated = new ExternalEndpoint(component.getEPRElementName(), getLocationURI(), getService(),
+ getEndpoint(), getInterfaceName());
ctx.registerExternalEndpoint(activated);
}
@@ -75,10 +72,9 @@
}
/**
- * Return the URI identifying this external endpoint.
- * This must be overriden so that endpoint resolution can work correctly.
- *
- * @return the URI identifying this external endpoint
+ * Return the URI identifying this external endpoint. This must be overriden so that endpoint resolution can work correctly.
+ *
+ * @return the URI identifying this external endpoint
*/
public String getLocationURI() {
return null;
@@ -93,8 +89,8 @@
/**
* Sets the endpoint name of the target endpoint.
- *
- * @param targetEndpoint a string specifiying the name of the target endpoint
+ *
+ * @param targetEndpoint a string specifiying the name of the target endpoint
* @org.apache.xbean.Property description="the name of the endpoint to which requests are sent"
*/
public void setTargetEndpoint(String targetEndpoint) {
@@ -110,8 +106,8 @@
/**
* Sets the name of the target interface.
- *
- * @param targetInterface a QName specifiying the name of the target interface
+ *
+ * @param targetInterface a QName specifiying the name of the target interface
* @org.apache.xbean.Property description="the QName of the interface to which requests are sent"
*/
public void setTargetInterface(QName targetInterface) {
@@ -127,8 +123,8 @@
/**
* Sets the name of the target service.
- *
- * @param targetService a QName specifiying the name of the target interface
+ *
+ * @param targetService a QName specifiying the name of the target interface
* @org.apache.xbean.Property description="the QName of the service to which requests are sent"
*/
public void setTargetService(QName targetService) {
@@ -144,8 +140,8 @@
/**
* Sets the name of the target operation.
- *
- * @param targetOperation a QName specifiying the name of the target operation
+ *
+ * @param targetOperation a QName specifiying the name of the target operation
* @org.apache.xbean.Property description="the QName of the operation to which requests are sent"
*/
public void setTargetOperation(QName targetOperation) {
@@ -165,7 +161,7 @@
public void setTargetUri(String targetUri) {
this.targetUri = targetUri;
}
-
+
protected void configureExchangeTarget(MessageExchange exchange) {
if (targetUri != null) {
URIResolver.configureExchange(exchange, getContext(), targetUri);
@@ -183,8 +179,8 @@
if (se != null) {
exchange.setEndpoint(se);
} else {
- logger.warn("Target service (" + targetService + ") and endpoint (" + targetEndpoint + ")" +
- " specified, but no matching endpoint found. Only the service will be used for routing.");
+ logger.warn("Target service (" + targetService + ") and endpoint (" + targetEndpoint + ")"
+ + " specified, but no matching endpoint found. Only the service will be used for routing.");
}
}
}