flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carlosrov...@apache.org
Subject [44/50] git commit: [flex-asjs] [refs/heads/feature/amf] - try returning a custom value object
Date Wed, 06 Sep 2017 22:31:37 GMT
try returning a custom value object


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/5d8b3e4e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/5d8b3e4e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/5d8b3e4e

Branch: refs/heads/feature/amf
Commit: 5d8b3e4e1fd84c76bd27033b069b95985b8e65e8
Parents: 34656e5
Author: Alex Harui <aharui@apache.org>
Authored: Mon Sep 4 09:24:05 2017 -0700
Committer: Carlos Rovira <carlosrovira@apache.org>
Committed: Thu Sep 7 00:24:03 2017 +0200

----------------------------------------------------------------------
 .../amfsamples/services/ExampleService.java     | 15 ++++++-
 .../valueobjects/ServerCustomType.java          | 45 ++++++++++++++++++++
 2 files changed, 59 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5d8b3e4e/examples/amf/SampleAmfWebApp/src/main/java/org/apache/flex/amfsamples/services/ExampleService.java
----------------------------------------------------------------------
diff --git a/examples/amf/SampleAmfWebApp/src/main/java/org/apache/flex/amfsamples/services/ExampleService.java
b/examples/amf/SampleAmfWebApp/src/main/java/org/apache/flex/amfsamples/services/ExampleService.java
index 324e59f..86d6d52 100644
--- a/examples/amf/SampleAmfWebApp/src/main/java/org/apache/flex/amfsamples/services/ExampleService.java
+++ b/examples/amf/SampleAmfWebApp/src/main/java/org/apache/flex/amfsamples/services/ExampleService.java
@@ -19,6 +19,7 @@
 
 package org.apache.flex.amfsamples.services;
 
+import org.apache.flex.amfsamples.valueobjects.ServerCustomType;
 import org.springframework.flex.remoting.RemotingDestination;
 import org.springframework.stereotype.Service;
 
@@ -30,5 +31,17 @@ public class ExampleService {
         System.out.println(String.format("Got message from: %s", name));
         return String.format("Hello %s", name);
     }
-
+    
+    public Object[] getObjectArray1()
+    {
+        System.out.println("getObjectArray1 called");
+        Object[] customTypes = new Object[10];
+        for (int i = 0; i < customTypes.length; i++)
+        {
+            ServerCustomType sct = new ServerCustomType();
+            sct.setId(i);
+            customTypes[i] = sct;
+        }
+        return customTypes;
+    }
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5d8b3e4e/examples/amf/SampleAmfWebApp/src/main/java/org/apache/flex/amfsamples/valueobjects/ServerCustomType.java
----------------------------------------------------------------------
diff --git a/examples/amf/SampleAmfWebApp/src/main/java/org/apache/flex/amfsamples/valueobjects/ServerCustomType.java
b/examples/amf/SampleAmfWebApp/src/main/java/org/apache/flex/amfsamples/valueobjects/ServerCustomType.java
new file mode 100644
index 0000000..0250c42
--- /dev/null
+++ b/examples/amf/SampleAmfWebApp/src/main/java/org/apache/flex/amfsamples/valueobjects/ServerCustomType.java
@@ -0,0 +1,45 @@
+/*
+ * 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.flex.amfsamples.valueobjects;
+
+/**
+ * The server side object used by AMFConnectionTestService. There is a 
+ * corresponding client side object.
+ */
+public class ServerCustomType
+{
+    private int id;
+
+    public ServerCustomType()
+    {
+    }
+
+    public int getId()
+    {
+        return id;
+    }
+
+    public void setId(int id)
+    {
+        this.id = id;
+    }
+
+    public String toString()
+    {
+        return "ServerCustomType: " + id;
+    }
+}


Mime
View raw message