public static StreamProcessorJsonUnmarshaller getInstance() { if (instance == null) instance = new StreamProcessorJsonUnmarshaller(); return instance; } }
listStreamProcessorsResult.setStreamProcessors(new ListUnmarshaller<StreamProcessor>(StreamProcessorJsonUnmarshaller.getInstance()) .unmarshall(context));
public ListStreamProcessorsResult unmarshall(JsonUnmarshallerContext context) throws Exception { ListStreamProcessorsResult listStreamProcessorsResult = new ListStreamProcessorsResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("NextToken")) { listStreamProcessorsResult.setNextToken(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("StreamProcessors")) { listStreamProcessorsResult .setStreamProcessors(new ListUnmarshaller<StreamProcessor>( StreamProcessorJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return listStreamProcessorsResult; }
public static StreamProcessorJsonUnmarshaller getInstance() { if (instance == null) instance = new StreamProcessorJsonUnmarshaller(); return instance; } }