You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by dk...@apache.org on 2011/12/02 18:03:50 UTC
svn commit: r1209585 [2/22] - in /camel/trunk: ./ apache-camel/
buildingtools/ camel-core/ camel-core/src/main/java/org/apache/camel/
camel-core/src/main/java/org/apache/camel/api/management/
camel-core/src/main/java/org/apache/camel/builder/ camel-cor...
Propchange: camel/trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Dec 2 17:03:07 2011
@@ -1,4 +1,13 @@
+.pmd
+.checkstyle
+.ruleset
target
-*.i??
-.project
.settings
+.classpath
+.project
+.wtpmodules
+prj.el
+.jdee_classpath
+.jdee_sources
+velocity.log
+eclipse-classes
Propchange: camel/trunk/apache-camel/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Dec 2 17:03:07 2011
@@ -1,5 +1,13 @@
-eclipse-classes
-target
-.classpath
-.project
-.settings
+.pmd
+.checkstyle
+.ruleset
+target
+.settings
+.classpath
+.project
+.wtpmodules
+prj.el
+.jdee_classpath
+.jdee_sources
+velocity.log
+eclipse-classes
Propchange: camel/trunk/buildingtools/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Dec 2 17:03:07 2011
@@ -1,5 +1,13 @@
-eclipse-classes
+.pmd
+.checkstyle
+.ruleset
target
-.project
-.classpath
.settings
+.classpath
+.project
+.wtpmodules
+prj.el
+.jdee_classpath
+.jdee_sources
+velocity.log
+eclipse-classes
Propchange: camel/trunk/camel-core/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Dec 2 17:03:07 2011
@@ -1,11 +1,13 @@
-.project
-.checkstyle
.pmd
-.classpath
+.checkstyle
+.ruleset
target
.settings
+.classpath
+.project
+.wtpmodules
+prj.el
+.jdee_classpath
+.jdee_sources
+velocity.log
eclipse-classes
-*.i??
-classes
-
-dependency-reduced-pom.xml
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/BytesSource.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/BytesSource.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/BytesSource.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/BytesSource.java Fri Dec 2 17:03:07 2011
@@ -1,65 +1,65 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.io.Serializable;
-
-import javax.xml.transform.stream.StreamSource;
-
-/**
- * A helper class which provides a JAXP {@link javax.xml.transform.Source
- * Source} from a byte[] which can be read as many times as required.
- *
- * @version
- */
-public class BytesSource extends StreamSource implements Serializable {
- private static final long serialVersionUID = 124123201106542082L;
-
- private final byte[] data;
-
- public BytesSource(byte[] data) {
- if (data == null) {
- throw new IllegalArgumentException("data must be specified");
- }
- this.data = data;
- }
-
- public BytesSource(byte[] data, String systemId) {
- this(data);
- setSystemId(systemId);
- }
-
- public InputStream getInputStream() {
- return new ByteArrayInputStream(data);
- }
-
- public Reader getReader() {
- return new InputStreamReader(getInputStream());
- }
-
- public byte[] getData() {
- return data;
- }
-
- public String toString() {
- return "BytesSource[" + new String(data) + "]";
- }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.Serializable;
+
+import javax.xml.transform.stream.StreamSource;
+
+/**
+ * A helper class which provides a JAXP {@link javax.xml.transform.Source
+ * Source} from a byte[] which can be read as many times as required.
+ *
+ * @version
+ */
+public class BytesSource extends StreamSource implements Serializable {
+ private static final long serialVersionUID = 124123201106542082L;
+
+ private final byte[] data;
+
+ public BytesSource(byte[] data) {
+ if (data == null) {
+ throw new IllegalArgumentException("data must be specified");
+ }
+ this.data = data;
+ }
+
+ public BytesSource(byte[] data, String systemId) {
+ this(data);
+ setSystemId(systemId);
+ }
+
+ public InputStream getInputStream() {
+ return new ByteArrayInputStream(data);
+ }
+
+ public Reader getReader() {
+ return new InputStreamReader(getInputStream());
+ }
+
+ public byte[] getData() {
+ return data;
+ }
+
+ public String toString() {
+ return "BytesSource[" + new String(data) + "]";
+ }
+}
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/BytesSource.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/CamelUnitOfWorkException.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/DelegateProcessor.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/DelegateProcessor.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/DelegateProcessor.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/DelegateProcessor.java Fri Dec 2 17:03:07 2011
@@ -1,29 +1,29 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel;
-
-/**
- * Interface to be used for processors that delegate to the real processor
- */
-public interface DelegateProcessor extends Processor {
-
- /**
- *
- * @return the processor we delegate to
- */
- Processor getProcessor();
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel;
+
+/**
+ * Interface to be used for processors that delegate to the real processor
+ */
+public interface DelegateProcessor extends Processor {
+
+ /**
+ *
+ * @return the processor we delegate to
+ */
+ Processor getProcessor();
+}
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/DelegateProcessor.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/EndpointConfiguration.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/ErrorHandlerFactory.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/ErrorHandlerFactory.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/ErrorHandlerFactory.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/ErrorHandlerFactory.java Fri Dec 2 17:03:07 2011
@@ -1,33 +1,33 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel;
-
-import org.apache.camel.spi.RouteContext;
-
-public interface ErrorHandlerFactory {
-
- /**
- * Creates the error handler interceptor
- *
- * @param routeContext the route context
- * @param processor the outer processor
- * @return the error handler
- * @throws Exception is thrown if the error handler could not be created
- */
- Processor createErrorHandler(RouteContext routeContext, Processor processor) throws Exception;
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel;
+
+import org.apache.camel.spi.RouteContext;
+
+public interface ErrorHandlerFactory {
+
+ /**
+ * Creates the error handler interceptor
+ *
+ * @param routeContext the route context
+ * @param processor the outer processor
+ * @return the error handler
+ * @throws Exception is thrown if the error handler could not be created
+ */
+ Processor createErrorHandler(RouteContext routeContext, Processor processor) throws Exception;
+
+}
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/ErrorHandlerFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/Main.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/Main.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/Main.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/Main.java Fri Dec 2 17:03:07 2011
@@ -1,25 +1,25 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel;
-
-/**
- * @deprecated use org.apache.camel.main.Main instead
- */
-@Deprecated
-public class Main extends org.apache.camel.main.Main {
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel;
+
+/**
+ * @deprecated use org.apache.camel.main.Main instead
+ */
+@Deprecated
+public class Main extends org.apache.camel.main.Main {
+
+}
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/Main.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/NamedNode.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/NamedNode.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/NamedNode.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/NamedNode.java Fri Dec 2 17:03:07 2011
@@ -1,38 +1,38 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel;
-
-public interface NamedNode {
-
- /**
- * Gets the value of the id property.
- */
- String getId();
-
- /**
- * Returns a short name for this node which can be useful for ID generation or referring to related resources like images
- *
- * @return defaults to "node" but derived nodes should overload this to provide a unique name
- */
- String getShortName();
-
- /**
- * Returns the description text or null if there is no description text associated with this node
- */
- String getDescriptionText();
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel;
+
+public interface NamedNode {
+
+ /**
+ * Gets the value of the id property.
+ */
+ String getId();
+
+ /**
+ * Returns a short name for this node which can be useful for ID generation or referring to related resources like images
+ *
+ * @return defaults to "node" but derived nodes should overload this to provide a unique name
+ */
+ String getShortName();
+
+ /**
+ * Returns the description text or null if there is no description text associated with this node
+ */
+ String getDescriptionText();
+
+}
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/NamedNode.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/Ordered.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/Ordered.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/Ordered.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/Ordered.java Fri Dec 2 17:03:07 2011
@@ -1,46 +1,46 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel;
-
-/**
- * Interface to be implement by objects that should be orderable, such as in a {@link java.util.Collection}.
- *
- * @version
- */
-public interface Ordered {
-
- /**
- * The highest precedence
- */
- int HIGHEST = Integer.MIN_VALUE;
-
- /**
- * The lowest precedence
- */
- int LOWEST = Integer.MAX_VALUE;
-
-
- /**
- * Gets the order.
- * <p/>
- * Use low numbers for higher priority. Normally the sorting will start from 0 and move upwards.
- * So if you want to be last then use {@link Integer#MAX_VALUE} or eg {@link #LOWEST}.
- *
- * @return the order
- */
- int getOrder();
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel;
+
+/**
+ * Interface to be implement by objects that should be orderable, such as in a {@link java.util.Collection}.
+ *
+ * @version
+ */
+public interface Ordered {
+
+ /**
+ * The highest precedence
+ */
+ int HIGHEST = Integer.MIN_VALUE;
+
+ /**
+ * The lowest precedence
+ */
+ int LOWEST = Integer.MAX_VALUE;
+
+
+ /**
+ * Gets the order.
+ * <p/>
+ * Use low numbers for higher priority. Normally the sorting will start from 0 and move upwards.
+ * So if you want to be last then use {@link Integer#MAX_VALUE} or eg {@link #LOWEST}.
+ *
+ * @return the order
+ */
+ int getOrder();
+}
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/Ordered.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/PollingConsumerPollingStrategy.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/StatefulService.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/StatefulService.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/StatefulService.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/StatefulService.java Fri Dec 2 17:03:07 2011
@@ -1,81 +1,81 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel;
-
-/**
- * A {@link Service} which has all the lifecycles events and offers details about its current state.
- */
-public interface StatefulService extends SuspendableService, ShutdownableService {
-
- /**
- * Returns the current status
- *
- * @return the current status
- */
- ServiceStatus getStatus();
-
- /**
- * Whether the service is started
- *
- * @return true if this service has been started
- */
- boolean isStarted();
-
- /**
- * Whether the service is starting
- *
- * @return true if this service is being started
- */
- boolean isStarting();
-
- /**
- * Whether the service is stopping
- *
- * @return true if this service is in the process of stopping
- */
- boolean isStopping();
-
- /**
- * Whether the service is stopped
- *
- * @return true if this service is stopped
- */
- boolean isStopped();
-
- /**
- * Whether the service is suspending
- *
- * @return true if this service is in the process of suspending
- */
- boolean isSuspending();
-
- /**
- * Helper methods so the service knows if it should keep running.
- * Returns <tt>false</tt> if the service is being stopped or is stopped.
- *
- * @return <tt>true</tt> if the service should continue to run.
- */
- boolean isRunAllowed();
-
- /**
- * Returns the version of this service
- *
- * @return the version
- */
- String getVersion();
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel;
+
+/**
+ * A {@link Service} which has all the lifecycles events and offers details about its current state.
+ */
+public interface StatefulService extends SuspendableService, ShutdownableService {
+
+ /**
+ * Returns the current status
+ *
+ * @return the current status
+ */
+ ServiceStatus getStatus();
+
+ /**
+ * Whether the service is started
+ *
+ * @return true if this service has been started
+ */
+ boolean isStarted();
+
+ /**
+ * Whether the service is starting
+ *
+ * @return true if this service is being started
+ */
+ boolean isStarting();
+
+ /**
+ * Whether the service is stopping
+ *
+ * @return true if this service is in the process of stopping
+ */
+ boolean isStopping();
+
+ /**
+ * Whether the service is stopped
+ *
+ * @return true if this service is stopped
+ */
+ boolean isStopped();
+
+ /**
+ * Whether the service is suspending
+ *
+ * @return true if this service is in the process of suspending
+ */
+ boolean isSuspending();
+
+ /**
+ * Helper methods so the service knows if it should keep running.
+ * Returns <tt>false</tt> if the service is being stopped or is stopped.
+ *
+ * @return <tt>true</tt> if the service should continue to run.
+ */
+ boolean isRunAllowed();
+
+ /**
+ * Returns the version of this service
+ *
+ * @return the version
+ */
+ String getVersion();
+
+}
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/StatefulService.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/StringSource.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/StringSource.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/StringSource.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/StringSource.java Fri Dec 2 17:03:07 2011
@@ -1,124 +1,124 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel;
-
-import java.io.ByteArrayInputStream;
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.io.Reader;
-import java.io.StringReader;
-import java.io.UnsupportedEncodingException;
-
-import javax.xml.transform.stream.StreamSource;
-
-/**
- * A helper class which provides a JAXP {@link javax.xml.transform.Source
- * Source} from a String which can be read as many times as required. Encoding
- * is default UTF-8.
- *
- * @version
- */
-public class StringSource extends StreamSource implements Externalizable {
- private String text;
- private String encoding = "UTF-8";
-
- public StringSource() {
- }
-
- public StringSource(String text) {
- if (text == null) {
- throw new IllegalArgumentException("text must be specified");
- }
- this.text = text;
- }
-
- public StringSource(String text, String systemId) {
- this(text);
- if (systemId == null) {
- throw new IllegalArgumentException("systemId must be specified");
- }
- setSystemId(systemId);
- }
-
- public StringSource(String text, String systemId, String encoding) {
- this(text, systemId);
- if (encoding == null) {
- throw new IllegalArgumentException("encoding must be specified");
- }
- this.encoding = encoding;
- }
-
- public InputStream getInputStream() {
- try {
- return new ByteArrayInputStream(text.getBytes(encoding));
- } catch (UnsupportedEncodingException e) {
- throw new RuntimeException(e);
- }
- }
-
- public Reader getReader() {
- return new StringReader(text);
- }
-
- public String toString() {
- return "StringSource[" + text + "]";
- }
-
- public String getText() {
- return text;
- }
-
- public String getEncoding() {
- return encoding;
- }
-
- public void writeExternal(ObjectOutput out) throws IOException {
- int b = (text != null ? 0x01 : 0x00) + (encoding != null ? 0x02 : 0x00) + (getPublicId() != null ? 0x04 : 0x00) + (getSystemId() != null ? 0x08 : 0x00);
- out.writeByte(b);
- if ((b & 0x01) != 0) {
- out.writeUTF(text);
- }
- if ((b & 0x02) != 0) {
- out.writeUTF(encoding);
- }
- if ((b & 0x04) != 0) {
- out.writeUTF(getPublicId());
- }
- if ((b & 0x08) != 0) {
- out.writeUTF(getSystemId());
- }
- }
-
- public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
- int b = in.readByte();
- if ((b & 0x01) != 0) {
- text = in.readUTF();
- }
- if ((b & 0x02) != 0) {
- encoding = in.readUTF();
- }
- if ((b & 0x04) != 0) {
- setPublicId(in.readUTF());
- }
- if ((b & 0x08) != 0) {
- setSystemId(in.readUTF());
- }
- }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel;
+
+import java.io.ByteArrayInputStream;
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.io.Reader;
+import java.io.StringReader;
+import java.io.UnsupportedEncodingException;
+
+import javax.xml.transform.stream.StreamSource;
+
+/**
+ * A helper class which provides a JAXP {@link javax.xml.transform.Source
+ * Source} from a String which can be read as many times as required. Encoding
+ * is default UTF-8.
+ *
+ * @version
+ */
+public class StringSource extends StreamSource implements Externalizable {
+ private String text;
+ private String encoding = "UTF-8";
+
+ public StringSource() {
+ }
+
+ public StringSource(String text) {
+ if (text == null) {
+ throw new IllegalArgumentException("text must be specified");
+ }
+ this.text = text;
+ }
+
+ public StringSource(String text, String systemId) {
+ this(text);
+ if (systemId == null) {
+ throw new IllegalArgumentException("systemId must be specified");
+ }
+ setSystemId(systemId);
+ }
+
+ public StringSource(String text, String systemId, String encoding) {
+ this(text, systemId);
+ if (encoding == null) {
+ throw new IllegalArgumentException("encoding must be specified");
+ }
+ this.encoding = encoding;
+ }
+
+ public InputStream getInputStream() {
+ try {
+ return new ByteArrayInputStream(text.getBytes(encoding));
+ } catch (UnsupportedEncodingException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public Reader getReader() {
+ return new StringReader(text);
+ }
+
+ public String toString() {
+ return "StringSource[" + text + "]";
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public String getEncoding() {
+ return encoding;
+ }
+
+ public void writeExternal(ObjectOutput out) throws IOException {
+ int b = (text != null ? 0x01 : 0x00) + (encoding != null ? 0x02 : 0x00) + (getPublicId() != null ? 0x04 : 0x00) + (getSystemId() != null ? 0x08 : 0x00);
+ out.writeByte(b);
+ if ((b & 0x01) != 0) {
+ out.writeUTF(text);
+ }
+ if ((b & 0x02) != 0) {
+ out.writeUTF(encoding);
+ }
+ if ((b & 0x04) != 0) {
+ out.writeUTF(getPublicId());
+ }
+ if ((b & 0x08) != 0) {
+ out.writeUTF(getSystemId());
+ }
+ }
+
+ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+ int b = in.readByte();
+ if ((b & 0x01) != 0) {
+ text = in.readUTF();
+ }
+ if ((b & 0x02) != 0) {
+ encoding = in.readUTF();
+ }
+ if ((b & 0x04) != 0) {
+ setPublicId(in.readUTF());
+ }
+ if ((b & 0x08) != 0) {
+ setSystemId(in.readUTF());
+ }
+ }
+}
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/StringSource.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/TimerListener.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/URIField.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/VetoCamelContextStartException.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/WrappedFile.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/WrappedFile.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/WrappedFile.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/WrappedFile.java Fri Dec 2 17:03:07 2011
@@ -1,31 +1,31 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel;
-
-/**
- * Wraps a file.
- */
-public interface WrappedFile<T> {
-
- /**
- * Gets the file.
- *
- * @return the file.
- */
- T getFile();
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel;
+
+/**
+ * Wraps a file.
+ */
+public interface WrappedFile<T> {
+
+ /**
+ * Gets the file.
+ *
+ * @return the file.
+ */
+ T getFile();
+
+}
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/WrappedFile.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/ManagedAttribute.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/ManagedInstance.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/ManagedNotification.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/ManagedNotification.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/ManagedNotification.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/ManagedNotification.java Fri Dec 2 17:03:07 2011
@@ -1,38 +1,38 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.api.management;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target(ElementType.TYPE)
-@Retention(RetentionPolicy.RUNTIME)
-@Inherited
-@Documented
-public @interface ManagedNotification {
-
- String name();
-
- String description() default "";
-
- String[] notificationTypes();
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.api.management;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+@Inherited
+@Documented
+public @interface ManagedNotification {
+
+ String name();
+
+ String description() default "";
+
+ String[] notificationTypes();
+
+}
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/ManagedNotification.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/ManagedNotifications.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/ManagedNotifications.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/ManagedNotifications.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/ManagedNotifications.java Fri Dec 2 17:03:07 2011
@@ -1,34 +1,34 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.api.management;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target(ElementType.TYPE)
-@Retention(RetentionPolicy.RUNTIME)
-@Inherited
-@Documented
-public @interface ManagedNotifications {
-
- ManagedNotification[] value();
-
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.api.management;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+@Inherited
+@Documented
+public @interface ManagedNotifications {
+
+ ManagedNotification[] value();
+
}
\ No newline at end of file
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/ManagedNotifications.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/ManagedOperation.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/ManagedResource.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/NotificationSender.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/NotificationSender.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/NotificationSender.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/NotificationSender.java Fri Dec 2 17:03:07 2011
@@ -1,26 +1,26 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.api.management;
-
-import javax.management.Notification;
-
-/**
- * To be implemented by classes that can send out notifications
- */
-public interface NotificationSender {
- void sendNotification(Notification notification);
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.api.management;
+
+import javax.management.Notification;
+
+/**
+ * To be implemented by classes that can send out notifications
+ */
+public interface NotificationSender {
+ void sendNotification(Notification notification);
+}
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/NotificationSender.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/NotificationSenderAware.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/NotificationSenderAware.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/NotificationSenderAware.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/NotificationSenderAware.java Fri Dec 2 17:03:07 2011
@@ -1,25 +1,25 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.api.management;
-
-/**
- * To be implemented by the user class to get a NotificationSender injected
- *
- */
-public interface NotificationSenderAware {
- void setNotificationSender(NotificationSender sender);
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.api.management;
+
+/**
+ * To be implemented by the user class to get a NotificationSender injected
+ *
+ */
+public interface NotificationSenderAware {
+ void setNotificationSender(NotificationSender sender);
+}
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/api/management/NotificationSenderAware.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/AdviceWithBuilder.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/AdviceWithRouteBuilder.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/AdviceWithTask.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/AdviceWithTasks.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ThreadPoolProfileBuilder.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ThreadPoolProfileBuilder.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ThreadPoolProfileBuilder.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ThreadPoolProfileBuilder.java Fri Dec 2 17:03:07 2011
@@ -1,86 +1,86 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.builder;
-
-import java.util.concurrent.TimeUnit;
-
-import org.apache.camel.ThreadPoolRejectedPolicy;
-import org.apache.camel.spi.ThreadPoolProfile;
-
-public class ThreadPoolProfileBuilder {
- private final ThreadPoolProfile profile;
-
- public ThreadPoolProfileBuilder(String id) {
- this.profile = new ThreadPoolProfile(id);
- }
-
- public ThreadPoolProfileBuilder(String id, ThreadPoolProfile origProfile) {
- this.profile = origProfile.clone();
- this.profile.setId(id);
- }
-
- public ThreadPoolProfileBuilder defaultProfile(Boolean defaultProfile) {
- this.profile.setDefaultProfile(defaultProfile);
- return this;
- }
-
-
- public ThreadPoolProfileBuilder poolSize(Integer poolSize) {
- profile.setPoolSize(poolSize);
- return this;
- }
-
- public ThreadPoolProfileBuilder maxPoolSize(Integer maxPoolSize) {
- profile.setMaxPoolSize(maxPoolSize);
- return this;
- }
-
- public ThreadPoolProfileBuilder keepAliveTime(Long keepAliveTime, TimeUnit timeUnit) {
- profile.setKeepAliveTime(keepAliveTime);
- profile.setTimeUnit(timeUnit);
- return this;
- }
-
- public ThreadPoolProfileBuilder keepAliveTime(Long keepAliveTime) {
- profile.setKeepAliveTime(keepAliveTime);
- return this;
- }
-
- public ThreadPoolProfileBuilder maxQueueSize(Integer maxQueueSize) {
- if (maxQueueSize != null) {
- profile.setMaxQueueSize(maxQueueSize);
- }
- return this;
- }
-
- public ThreadPoolProfileBuilder rejectedPolicy(ThreadPoolRejectedPolicy rejectedPolicy) {
- profile.setRejectedPolicy(rejectedPolicy);
- return this;
- }
-
- /**
- * Builds the new thread pool
- *
- * @return the created thread pool
- * @throws Exception is thrown if error building the thread pool
- */
- public ThreadPoolProfile build() {
- return profile;
- }
-
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.builder;
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.ThreadPoolRejectedPolicy;
+import org.apache.camel.spi.ThreadPoolProfile;
+
+public class ThreadPoolProfileBuilder {
+ private final ThreadPoolProfile profile;
+
+ public ThreadPoolProfileBuilder(String id) {
+ this.profile = new ThreadPoolProfile(id);
+ }
+
+ public ThreadPoolProfileBuilder(String id, ThreadPoolProfile origProfile) {
+ this.profile = origProfile.clone();
+ this.profile.setId(id);
+ }
+
+ public ThreadPoolProfileBuilder defaultProfile(Boolean defaultProfile) {
+ this.profile.setDefaultProfile(defaultProfile);
+ return this;
+ }
+
+
+ public ThreadPoolProfileBuilder poolSize(Integer poolSize) {
+ profile.setPoolSize(poolSize);
+ return this;
+ }
+
+ public ThreadPoolProfileBuilder maxPoolSize(Integer maxPoolSize) {
+ profile.setMaxPoolSize(maxPoolSize);
+ return this;
+ }
+
+ public ThreadPoolProfileBuilder keepAliveTime(Long keepAliveTime, TimeUnit timeUnit) {
+ profile.setKeepAliveTime(keepAliveTime);
+ profile.setTimeUnit(timeUnit);
+ return this;
+ }
+
+ public ThreadPoolProfileBuilder keepAliveTime(Long keepAliveTime) {
+ profile.setKeepAliveTime(keepAliveTime);
+ return this;
+ }
+
+ public ThreadPoolProfileBuilder maxQueueSize(Integer maxQueueSize) {
+ if (maxQueueSize != null) {
+ profile.setMaxQueueSize(maxQueueSize);
+ }
+ return this;
+ }
+
+ public ThreadPoolProfileBuilder rejectedPolicy(ThreadPoolRejectedPolicy rejectedPolicy) {
+ profile.setRejectedPolicy(rejectedPolicy);
+ return this;
+ }
+
+ /**
+ * Builds the new thread pool
+ *
+ * @return the created thread pool
+ * @throws Exception is thrown if error building the thread pool
+ */
+ public ThreadPoolProfile build() {
+ return profile;
+ }
+
+
+}
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ThreadPoolProfileBuilder.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltErrorListener.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/component/ResourceEndpoint.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/AbstractCamelInvocationHandler.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/AbstractCamelInvocationHandler.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/AbstractCamelInvocationHandler.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/AbstractCamelInvocationHandler.java Fri Dec 2 17:03:07 2011
@@ -1,217 +1,217 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.bean;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Future;
-import java.util.concurrent.FutureTask;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.CamelExchangeException;
-import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
-import org.apache.camel.ExchangePattern;
-import org.apache.camel.InvalidPayloadException;
-import org.apache.camel.Producer;
-import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.impl.DefaultExchange;
-import org.apache.camel.util.ObjectHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public abstract class AbstractCamelInvocationHandler implements InvocationHandler {
-
- private static final transient Logger LOG = LoggerFactory.getLogger(CamelInvocationHandler.class);
- private static ExecutorService executorService;
- protected final Endpoint endpoint;
- protected final Producer producer;
-
- public AbstractCamelInvocationHandler(Endpoint endpoint, Producer producer) {
- super();
- this.endpoint = endpoint;
- this.producer = producer;
- }
-
- private static Object getBody(Exchange exchange, Class<?> type) throws InvalidPayloadException {
- // get the body from the Exchange from either OUT or IN
- if (exchange.hasOut()) {
- if (exchange.getOut().getBody() != null) {
- return exchange.getOut().getMandatoryBody(type);
- } else {
- return null;
- }
- } else {
- if (exchange.getIn().getBody() != null) {
- return exchange.getIn().getMandatoryBody(type);
- } else {
- return null;
- }
- }
- }
-
- protected Object invokeWithbody(final Method method, Object body, final ExchangePattern pattern) throws InterruptedException, Throwable {
- final Exchange exchange = new DefaultExchange(endpoint, pattern);
- exchange.getIn().setBody(body);
-
- // is the return type a future
- final boolean isFuture = method.getReturnType() == Future.class;
-
- // create task to execute the proxy and gather the reply
- FutureTask<Object> task = new FutureTask<Object>(new Callable<Object>() {
- public Object call() throws Exception {
- // process the exchange
- LOG.trace("Proxied method call {} invoking producer: {}", method.getName(), producer);
- producer.process(exchange);
-
- Object answer = afterInvoke(method, exchange, pattern, isFuture);
- LOG.trace("Proxied method call {} returning: {}", method.getName(), answer);
- return answer;
- }
- });
-
- if (isFuture) {
- // submit task and return future
- if (LOG.isTraceEnabled()) {
- LOG.trace("Submitting task for exchange id {}", exchange.getExchangeId());
- }
- getExecutorService(exchange.getContext()).submit(task);
- return task;
- } else {
- // execute task now
- try {
- task.run();
- return task.get();
- } catch (ExecutionException e) {
- // we don't want the wrapped exception from JDK
- throw e.getCause();
- }
- }
- }
-
- protected Object afterInvoke(Method method, Exchange exchange, ExchangePattern pattern, boolean isFuture) throws Exception {
- // check if we had an exception
- Throwable cause = exchange.getException();
- if (cause != null) {
- Throwable found = findSuitableException(cause, method);
- if (found != null) {
- if (found instanceof Exception) {
- throw (Exception)found;
- } else {
- // wrap as exception
- throw new CamelExchangeException("Error processing exchange", exchange, cause);
- }
- }
- // special for runtime camel exceptions as they can be nested
- if (cause instanceof RuntimeCamelException) {
- // if the inner cause is a runtime exception we can throw it
- // directly
- if (cause.getCause() instanceof RuntimeException) {
- throw (RuntimeException)((RuntimeCamelException)cause).getCause();
- }
- throw (RuntimeCamelException)cause;
- }
- // okay just throw the exception as is
- if (cause instanceof Exception) {
- throw (Exception)cause;
- } else {
- // wrap as exception
- throw new CamelExchangeException("Error processing exchange", exchange, cause);
- }
- }
-
- Class<?> to = isFuture ? getGenericType(exchange.getContext(), method.getGenericReturnType()) : method.getReturnType();
-
- // do not return a reply if the method is VOID
- if (to == Void.TYPE) {
- return null;
- }
-
- return getBody(exchange, to);
- }
-
- protected static Class<?> getGenericType(CamelContext context, Type type) throws ClassNotFoundException {
- if (type == null) {
- // fallback and use object
- return Object.class;
- }
-
- // unfortunately java dont provide a nice api for getting the generic
- // type of the return type
- // due type erasure, so we have to gather it based on a String
- // representation
- String name = ObjectHelper.between(type.toString(), "<", ">");
- if (name != null) {
- if (name.contains("<")) {
- // we only need the outer type
- name = ObjectHelper.before(name, "<");
- }
- return context.getClassResolver().resolveMandatoryClass(name);
- } else {
- // fallback and use object
- return Object.class;
- }
- }
-
- protected static synchronized ExecutorService getExecutorService(CamelContext context) {
- // CamelContext will shutdown thread pool when it shutdown so we can
- // lazy create it on demand
- // but in case of hot-deploy or the likes we need to be able to
- // re-create it (its a shared static instance)
- if (executorService == null || executorService.isTerminated() || executorService.isShutdown()) {
- // try to lookup a pool first based on id/profile
- executorService = context.getExecutorServiceStrategy().lookup(CamelInvocationHandler.class, "CamelInvocationHandler", "CamelInvocationHandler");
- if (executorService == null) {
- executorService = context.getExecutorServiceStrategy().newDefaultThreadPool(CamelInvocationHandler.class, "CamelInvocationHandler");
- }
- }
- return executorService;
- }
-
- /**
- * Tries to find the best suited exception to throw.
- * <p/>
- * It looks in the exception hierarchy from the caused exception and matches
- * this against the declared exceptions being thrown on the method.
- *
- * @param cause the caused exception
- * @param method the method
- * @return the exception to throw, or <tt>null</tt> if not possible to find
- * a suitable exception
- */
- protected Throwable findSuitableException(Throwable cause, Method method) {
- if (method.getExceptionTypes() == null || method.getExceptionTypes().length == 0) {
- return null;
- }
-
- // see if there is any exception which matches the declared exception on
- // the method
- for (Class<?> type : method.getExceptionTypes()) {
- Object fault = ObjectHelper.getException(type, cause);
- if (fault != null) {
- return Throwable.class.cast(fault);
- }
- }
-
- return null;
- }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.bean;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+import java.util.concurrent.FutureTask;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelExchangeException;
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.InvalidPayloadException;
+import org.apache.camel.Producer;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.impl.DefaultExchange;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public abstract class AbstractCamelInvocationHandler implements InvocationHandler {
+
+ private static final transient Logger LOG = LoggerFactory.getLogger(CamelInvocationHandler.class);
+ private static ExecutorService executorService;
+ protected final Endpoint endpoint;
+ protected final Producer producer;
+
+ public AbstractCamelInvocationHandler(Endpoint endpoint, Producer producer) {
+ super();
+ this.endpoint = endpoint;
+ this.producer = producer;
+ }
+
+ private static Object getBody(Exchange exchange, Class<?> type) throws InvalidPayloadException {
+ // get the body from the Exchange from either OUT or IN
+ if (exchange.hasOut()) {
+ if (exchange.getOut().getBody() != null) {
+ return exchange.getOut().getMandatoryBody(type);
+ } else {
+ return null;
+ }
+ } else {
+ if (exchange.getIn().getBody() != null) {
+ return exchange.getIn().getMandatoryBody(type);
+ } else {
+ return null;
+ }
+ }
+ }
+
+ protected Object invokeWithbody(final Method method, Object body, final ExchangePattern pattern) throws InterruptedException, Throwable {
+ final Exchange exchange = new DefaultExchange(endpoint, pattern);
+ exchange.getIn().setBody(body);
+
+ // is the return type a future
+ final boolean isFuture = method.getReturnType() == Future.class;
+
+ // create task to execute the proxy and gather the reply
+ FutureTask<Object> task = new FutureTask<Object>(new Callable<Object>() {
+ public Object call() throws Exception {
+ // process the exchange
+ LOG.trace("Proxied method call {} invoking producer: {}", method.getName(), producer);
+ producer.process(exchange);
+
+ Object answer = afterInvoke(method, exchange, pattern, isFuture);
+ LOG.trace("Proxied method call {} returning: {}", method.getName(), answer);
+ return answer;
+ }
+ });
+
+ if (isFuture) {
+ // submit task and return future
+ if (LOG.isTraceEnabled()) {
+ LOG.trace("Submitting task for exchange id {}", exchange.getExchangeId());
+ }
+ getExecutorService(exchange.getContext()).submit(task);
+ return task;
+ } else {
+ // execute task now
+ try {
+ task.run();
+ return task.get();
+ } catch (ExecutionException e) {
+ // we don't want the wrapped exception from JDK
+ throw e.getCause();
+ }
+ }
+ }
+
+ protected Object afterInvoke(Method method, Exchange exchange, ExchangePattern pattern, boolean isFuture) throws Exception {
+ // check if we had an exception
+ Throwable cause = exchange.getException();
+ if (cause != null) {
+ Throwable found = findSuitableException(cause, method);
+ if (found != null) {
+ if (found instanceof Exception) {
+ throw (Exception)found;
+ } else {
+ // wrap as exception
+ throw new CamelExchangeException("Error processing exchange", exchange, cause);
+ }
+ }
+ // special for runtime camel exceptions as they can be nested
+ if (cause instanceof RuntimeCamelException) {
+ // if the inner cause is a runtime exception we can throw it
+ // directly
+ if (cause.getCause() instanceof RuntimeException) {
+ throw (RuntimeException)((RuntimeCamelException)cause).getCause();
+ }
+ throw (RuntimeCamelException)cause;
+ }
+ // okay just throw the exception as is
+ if (cause instanceof Exception) {
+ throw (Exception)cause;
+ } else {
+ // wrap as exception
+ throw new CamelExchangeException("Error processing exchange", exchange, cause);
+ }
+ }
+
+ Class<?> to = isFuture ? getGenericType(exchange.getContext(), method.getGenericReturnType()) : method.getReturnType();
+
+ // do not return a reply if the method is VOID
+ if (to == Void.TYPE) {
+ return null;
+ }
+
+ return getBody(exchange, to);
+ }
+
+ protected static Class<?> getGenericType(CamelContext context, Type type) throws ClassNotFoundException {
+ if (type == null) {
+ // fallback and use object
+ return Object.class;
+ }
+
+ // unfortunately java dont provide a nice api for getting the generic
+ // type of the return type
+ // due type erasure, so we have to gather it based on a String
+ // representation
+ String name = ObjectHelper.between(type.toString(), "<", ">");
+ if (name != null) {
+ if (name.contains("<")) {
+ // we only need the outer type
+ name = ObjectHelper.before(name, "<");
+ }
+ return context.getClassResolver().resolveMandatoryClass(name);
+ } else {
+ // fallback and use object
+ return Object.class;
+ }
+ }
+
+ protected static synchronized ExecutorService getExecutorService(CamelContext context) {
+ // CamelContext will shutdown thread pool when it shutdown so we can
+ // lazy create it on demand
+ // but in case of hot-deploy or the likes we need to be able to
+ // re-create it (its a shared static instance)
+ if (executorService == null || executorService.isTerminated() || executorService.isShutdown()) {
+ // try to lookup a pool first based on id/profile
+ executorService = context.getExecutorServiceStrategy().lookup(CamelInvocationHandler.class, "CamelInvocationHandler", "CamelInvocationHandler");
+ if (executorService == null) {
+ executorService = context.getExecutorServiceStrategy().newDefaultThreadPool(CamelInvocationHandler.class, "CamelInvocationHandler");
+ }
+ }
+ return executorService;
+ }
+
+ /**
+ * Tries to find the best suited exception to throw.
+ * <p/>
+ * It looks in the exception hierarchy from the caused exception and matches
+ * this against the declared exceptions being thrown on the method.
+ *
+ * @param cause the caused exception
+ * @param method the method
+ * @return the exception to throw, or <tt>null</tt> if not possible to find
+ * a suitable exception
+ */
+ protected Throwable findSuitableException(Throwable cause, Method method) {
+ if (method.getExceptionTypes() == null || method.getExceptionTypes().length == 0) {
+ return null;
+ }
+
+ // see if there is any exception which matches the declared exception on
+ // the method
+ for (Class<?> type : method.getExceptionTypes()) {
+ Object fault = ObjectHelper.getException(type, cause);
+ if (fault != null) {
+ return Throwable.class.cast(fault);
+ }
+ }
+
+ return null;
+ }
+
+}
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/AbstractCamelInvocationHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanHelper.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/PojoMessageInvocationHandler.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/PojoMessageInvocationHandler.java?rev=1209585&r1=1209584&r2=1209585&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/PojoMessageInvocationHandler.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/PojoMessageInvocationHandler.java Fri Dec 2 17:03:07 2011
@@ -1,48 +1,48 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.bean;
-
-import java.lang.reflect.Method;
-
-import org.apache.camel.Endpoint;
-import org.apache.camel.ExchangePattern;
-import org.apache.camel.Producer;
-import org.apache.camel.RuntimeCamelException;
-
-/**
- * Special InvocationHandler for methods that have only one parameter. This
- * parameter is directly sent to as the body of the message. The idea is to use
- * that as a very open message format especially when combined with e.g. JAXB
- * serialization.
- */
-public class PojoMessageInvocationHandler extends AbstractCamelInvocationHandler {
- public PojoMessageInvocationHandler(Endpoint endpoint, Producer producer) {
- super(endpoint, producer);
- }
-
- public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
- int argsLength = (args == null) ? 0 : args.length;
- if (argsLength != 1) {
- throw new RuntimeCamelException(String.format("Error creating proxy for %s.%s Number of arguments must be 1 but is %d",
- method.getDeclaringClass().getName(),
- method.getName(), argsLength));
- }
- final ExchangePattern pattern = method.getReturnType() != Void.TYPE ? ExchangePattern.InOut : ExchangePattern.InOnly;
- return invokeWithbody(method, args[0], pattern);
- }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.bean;
+
+import java.lang.reflect.Method;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.Producer;
+import org.apache.camel.RuntimeCamelException;
+
+/**
+ * Special InvocationHandler for methods that have only one parameter. This
+ * parameter is directly sent to as the body of the message. The idea is to use
+ * that as a very open message format especially when combined with e.g. JAXB
+ * serialization.
+ */
+public class PojoMessageInvocationHandler extends AbstractCamelInvocationHandler {
+ public PojoMessageInvocationHandler(Endpoint endpoint, Producer producer) {
+ super(endpoint, producer);
+ }
+
+ public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
+ int argsLength = (args == null) ? 0 : args.length;
+ if (argsLength != 1) {
+ throw new RuntimeCamelException(String.format("Error creating proxy for %s.%s Number of arguments must be 1 but is %d",
+ method.getDeclaringClass().getName(),
+ method.getName(), argsLength));
+ }
+ final ExchangePattern pattern = method.getReturnType() != Void.TYPE ? ExchangePattern.InOut : ExchangePattern.InOnly;
+ return invokeWithbody(method, args[0], pattern);
+ }
+
+}
Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/PojoMessageInvocationHandler.java
------------------------------------------------------------------------------
svn:eol-style = native