Author: arnaudsimon
Date: Wed Nov 19 05:36:22 2008
New Revision: 718957

URL: http://svn.apache.org/viewvc?rev=718957&view=rev
Log:
QPID-1463: Andrea's patches
- Added 6 data types (Int8, Int16, Int32, Int64, Double and Float);

Added:
    
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Double.java
    
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Float.java
    
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Int16.java
    
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Int32.java
    
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Int64.java
    
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Int8.java

Added: 
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Double.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Double.java?rev=718957&view=auto
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Double.java
 (added)
+++ 
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Double.java
 Wed Nov 19 05:36:22 2008
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.qpid.management.domain.model.type;
+
+import org.apache.qpid.transport.codec.Decoder;
+import org.apache.qpid.transport.codec.Encoder;
+
+public class Double extends Type
+{
+       public Double()
+       {
+               super(java.lang.Double.class);
+       }
+       
+       @Override
+       public Object decode(Decoder decoder)
+       {
+               return decoder.readDouble();
+       }
+
+       @Override
+       public void encode(Object value, Encoder encoder)
+       {
+               encoder.writeDouble((java.lang.Double)value);
+       }
+}

Added: 
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Float.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Float.java?rev=718957&view=auto
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Float.java
 (added)
+++ 
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Float.java
 Wed Nov 19 05:36:22 2008
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.qpid.management.domain.model.type;
+
+import org.apache.qpid.transport.codec.Decoder;
+import org.apache.qpid.transport.codec.Encoder;
+
+public class Float extends Type
+{
+       public Float()
+       {
+               super(java.lang.Float.class);
+       }
+       
+       @Override
+       public Object decode(Decoder decoder)
+       {
+               return decoder.readFloat();
+       }
+
+       @Override
+       public void encode(Object value, Encoder encoder)
+       {
+               encoder.writeFloat((java.lang.Float)value);
+       }
+}

Added: 
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Int16.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Int16.java?rev=718957&view=auto
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Int16.java
 (added)
+++ 
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Int16.java
 Wed Nov 19 05:36:22 2008
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.qpid.management.domain.model.type;
+
+import org.apache.qpid.transport.codec.Decoder;
+import org.apache.qpid.transport.codec.Encoder;
+
+public class Int16 extends Type
+{
+    public Int16()
+    {
+        super(Short.class);
+    }
+
+    @Override
+    public Object decode (Decoder decoder)
+    {
+        return decoder.readInt16();
+    }
+    
+    @Override
+    public void encode (Object value, Encoder encoder)
+    {
+       encoder.writeInt16((Short)value);
+    }    
+}
\ No newline at end of file

Added: 
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Int32.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Int32.java?rev=718957&view=auto
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Int32.java
 (added)
+++ 
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Int32.java
 Wed Nov 19 05:36:22 2008
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.qpid.management.domain.model.type;
+
+import org.apache.qpid.transport.codec.Decoder;
+import org.apache.qpid.transport.codec.Encoder;
+
+public class Int32 extends Type
+{
+    public Int32()
+    {
+        super(Integer.class);
+    }
+
+    @Override
+    public Object decode (Decoder decoder)
+    {
+        return decoder.readInt32();
+    }
+    
+    @Override
+    public void encode (Object value, Encoder encoder)
+    {
+       encoder.writeInt32((Integer)value);
+    }    
+}
\ No newline at end of file

Added: 
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Int64.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Int64.java?rev=718957&view=auto
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Int64.java
 (added)
+++ 
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Int64.java
 Wed Nov 19 05:36:22 2008
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.qpid.management.domain.model.type;
+
+import org.apache.qpid.transport.codec.Decoder;
+import org.apache.qpid.transport.codec.Encoder;
+
+public class Int64 extends Type
+{
+    public Int64()
+    {
+        super(Long.class);
+    }
+
+    @Override
+    public Object decode (Decoder decoder)
+    {
+        return decoder.readInt64();
+    }
+    
+    @Override
+    public void encode (Object value, Encoder encoder)
+    {
+       encoder.writeInt64((Long)value);
+    }    
+}
\ No newline at end of file

Added: 
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Int8.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Int8.java?rev=718957&view=auto
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Int8.java
 (added)
+++ 
incubator/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/type/Int8.java
 Wed Nov 19 05:36:22 2008
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.qpid.management.domain.model.type;
+
+import org.apache.qpid.transport.codec.Decoder;
+import org.apache.qpid.transport.codec.Encoder;
+
+public class Int8 extends Type
+{
+    public Int8()
+    {
+        super(Byte.class);
+    }
+
+    @Override
+    public Object decode (Decoder decoder)
+    {
+        return decoder.readInt8();
+    }
+    
+    @Override
+    public void encode (Object value, Encoder encoder)
+    {
+       encoder.writeInt8((Byte)value);
+    }    
+}
\ No newline at end of file


Reply via email to