// get the server time
if ("requestServerTime".equals(lType)) {
// create the response token
// this includes the unique token-id
Token lResponse = createResponse(aToken);
// add the "time" and "started" field
lResponse.put("time", new Date().toString());
lResponse.put("started", aConnector.getVar(SAMPLE_VAR));
// put an array into the token
lResponse.put("array", new Object[]{1, 2, 3, 'a', 'b', 'c', "ABC", "XYZ", true, false});
// put a map into the token
Map lMap = new FastMap();
lMap.put("MapItem1", 1);
lMap.put("MapItem2", 2);
lResponse.put("map", lMap);
List lList = new FastList();
lList.add("ListItem1");
lList.add("ListItem2");
lResponse.put("list", lList);
// put a token into a token
Token lToken = new Token();
lToken.put("number", 1);
lToken.put("string", "test");
lToken.put("float", 1.23456);
lToken.put("boolean", false);
lToken.put("array", new Object[]{4, 5, 6, 'd', 'e', 'f', "DEF", "UVW", false, true});
// insert subtoken, another level in object's hierarchy...
Token lSubToken = new Token();
lSubToken.put("number", 2);
lSubToken.put("string", "demo");
lSubToken.put("float", 2.34567);
lSubToken.put("boolean", true);
lSubToken.put("array", new Object[]{7, 8, 9, 'g', 'h', 'i', "GHI", "RST", true, false});
lToken.put("subtoken", lSubToken);
// put the token incl. its subtoken into the response
lResponse.put("token", lToken);