Removed object transformer
This commit is contained in:
@@ -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<T> implements Message<T> {
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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> {
|
||||
|
||||
T getPayload();
|
||||
|
||||
void transformPayload(ObjectTransformer transformer);
|
||||
|
||||
void lock();
|
||||
|
||||
void unlock();
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user