From dea2a5a7fdabca778ca8a109587166453ab80ccb Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Sat, 15 Dec 2007 18:33:53 +0000 Subject: [PATCH] Removed object transformer --- .../integration/message/GenericMessage.java | 12 --------- .../integration/message/Message.java | 4 --- .../transformer/ObjectTransformer.java | 26 ------------------- 3 files changed, 42 deletions(-) delete mode 100644 spring-integration-core/src/main/java/org/springframework/integration/transformer/ObjectTransformer.java diff --git a/spring-integration-core/src/main/java/org/springframework/integration/message/GenericMessage.java b/spring-integration-core/src/main/java/org/springframework/integration/message/GenericMessage.java index a06d2fd6e0..65cebaeede 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/message/GenericMessage.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/message/GenericMessage.java @@ -19,7 +19,6 @@ package org.springframework.integration.message; import java.util.concurrent.locks.ReentrantLock; import org.springframework.integration.SystemInterruptedException; -import org.springframework.integration.transformer.ObjectTransformer; import org.springframework.util.Assert; /** @@ -82,15 +81,4 @@ public class GenericMessage implements Message { lock.unlock(); } - public void transformPayload(ObjectTransformer transformer) { - this.lock(); - try { - // TODO: remove this method (probably) or parameterize transformer - this.setPayload((T) transformer.transform(this.getPayload())); - } - finally { - this.unlock(); - } - } - } diff --git a/spring-integration-core/src/main/java/org/springframework/integration/message/Message.java b/spring-integration-core/src/main/java/org/springframework/integration/message/Message.java index 92003cdf2e..bff4930903 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/message/Message.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/message/Message.java @@ -16,8 +16,6 @@ package org.springframework.integration.message; -import org.springframework.integration.transformer.ObjectTransformer; - /** * The central interface that any Message type must implement. * @@ -31,8 +29,6 @@ public interface Message { T getPayload(); - void transformPayload(ObjectTransformer transformer); - void lock(); void unlock(); diff --git a/spring-integration-core/src/main/java/org/springframework/integration/transformer/ObjectTransformer.java b/spring-integration-core/src/main/java/org/springframework/integration/transformer/ObjectTransformer.java deleted file mode 100644 index 18dc91869d..0000000000 --- a/spring-integration-core/src/main/java/org/springframework/integration/transformer/ObjectTransformer.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2002-2007 the original author or authors. - * - * Licensed 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.springframework.integration.transformer; - -/** - * @author Mark Fisher - */ -public interface ObjectTransformer { - - public Object transform(Object source); - -}