org.jclouds.gogrid.config
Class DateSecondsAdapter

java.lang.Object
  extended by org.jclouds.gogrid.config.DateSecondsAdapter
All Implemented Interfaces:
JsonDeserializer<Date>, JsonSerializer<Date>, GsonModule.DateAdapter

@Singleton
public class DateSecondsAdapter
extends Object
implements GsonModule.DateAdapter

Configures the GoGrid connection, including logging and http transport.

Author:
Adrian Cole, Oleksiy Yarmula

Constructor Summary
DateSecondsAdapter()
           
 
Method Summary
 Date deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
           
 JsonElement serialize(Date src, Type typeOfSrc, JsonSerializationContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateSecondsAdapter

public DateSecondsAdapter()
Method Detail

serialize

public JsonElement serialize(Date src,
                             Type typeOfSrc,
                             JsonSerializationContext context)
Specified by:
serialize in interface JsonSerializer<Date>

deserialize

public Date deserialize(JsonElement json,
                        Type typeOfT,
                        JsonDeserializationContext context)
                 throws JsonParseException
Specified by:
deserialize in interface JsonDeserializer<Date>
Throws:
JsonParseException


Copyright © 2009-2010 jclouds. All Rights Reserved.