might as well use the generic stuff - sigh

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@492994 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2007-01-05 11:48:37 +00:00
parent 720a19c5bf
commit d2bff5d8ed
1 changed files with 3 additions and 4 deletions

View File

@ -28,16 +28,15 @@ import java.util.concurrent.atomic.AtomicInteger;
* Marshall an AtomicInteger
* @version $Revision: 1.10 $
*/
public class AtomicIntegerMarshaller implements Marshaller{
public class AtomicIntegerMarshaller implements Marshaller<AtomicInteger>{
public void writePayload(Object object,DataOutput dataOut) throws IOException{
AtomicInteger ai = (AtomicInteger) object;
public void writePayload(AtomicInteger ai,DataOutput dataOut) throws IOException{
dataOut.writeInt(ai.get());
}
public Object readPayload(DataInput dataIn) throws IOException{
public AtomicInteger readPayload(DataInput dataIn) throws IOException{
int value = dataIn.readInt();
return new AtomicInteger(value);
}