Package org.jclouds.http.functions
Class ParseJson<T>
- java.lang.Object
-
- org.jclouds.http.functions.ParseJson<T>
-
- All Implemented Interfaces:
com.google.common.base.Function<HttpResponse,T>
,Function<HttpResponse,T>
- Direct Known Subclasses:
ActionApi.ParseActions
,DeviceApi.ParseDevices
,DropletApi.ParseBackups
,DropletApi.ParseDropletActions
,DropletApi.ParseDroplets
,DropletApi.ParseKernels
,DropletApi.ParseSnapshots
,FacilityApi.ParseFacilities
,ImageApi.ParseImages
,KeyApi.ParseKeys
,OperatingSystemApi.ParseOperatingSystems
,ParseB2ErrorFromJsonContent
,ParseFirewallPolicies
,ParseFirewallRules
,ParseFirewalls
,ParseFlavorDetails
,ParseFlavors
,ParseFloatingIPs
,ParseHealthMonitors
,ParseImageDetails
,ParseImageDetails
,ParseImages
,ParseImages
,ParseLoadBalancerUsages
,ParseMembers
,ParseMetadata
,ParseNetworks
,ParseNodes
,ParsePools
,ParsePorts
,ParseRouters
,ParseRules
,ParseSecurityGroups
,ParseServerDetails
,ParseServers
,ParseServices
,ParseSubnets
,ParseTenants
,ParseUsers
,ParseVIPs
,PlanApi.ParsePlans
,ProjectApi.ParseProjects
,RegionApi.ParseRegions
,SizeApi.ParseSizes
,SshKeyApi.ParseSshKeys
@Singleton public class ParseJson<T> extends Object implements com.google.common.base.Function<HttpResponse,T>
This object will parse the body of an HttpResponse and return the result of typeback to the caller.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
apply(InputStream stream)
<V> V
apply(InputStream stream, Type type)
T
apply(HttpResponse from)
parses the http response body to create a new<T>
.
-
-
-
Method Detail
-
apply
public T apply(HttpResponse from)
parses the http response body to create a new<T>
.- Specified by:
apply
in interfacecom.google.common.base.Function<HttpResponse,T>
- Specified by:
apply
in interfaceFunction<HttpResponse,T>
-
apply
public T apply(InputStream stream) throws IOException
- Throws:
IOException
-
apply
public <V> V apply(InputStream stream, Type type) throws IOException
- Throws:
IOException
-
-