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,ParseArchiveMetadataCollectionFromHttpContent,ParseB2ErrorFromJsonContent,ParseFirewallPolicies,ParseFirewallRules,ParseFirewalls,ParseFlavorDetails,ParseFlavors,ParseFloatingIPs,ParseGlacierErrorFromJsonContent,ParseHealthMonitors,ParseImageDetails,ParseImages,ParseJobMetadataFromHttpContent,ParseJobMetadataListFromHttpContent,ParseLoadBalancerUsages,ParseMembers,ParseMetadata,ParseMultipartUploadListFromHttpContent,ParseMultipartUploadPartListFromHttpContent,ParseNetworks,ParseNodes,ParsePools,ParsePorts,ParseRouters,ParseRules,ParseSecurityGroups,ParseServerDetails,ParseServers,ParseServices,ParseSubnets,ParseTenants,ParseUsers,ParseVaultMetadataFromHttpContent,ParseVaultMetadataListFromHttpContent,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
type back to the caller.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(InputStream stream) <V> Vapply(InputStream stream, Type type) apply(HttpResponse from) parses the http response body to create a new<T>.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.common.base.Function
equals
-
Field Details
-
logger
-
json
-
type
-
-
Constructor Details
-
ParseJson
-
-
Method Details
-
apply
parses the http response body to create a new<T>.- Specified by:
applyin interfacecom.google.common.base.Function<HttpResponse,T> - Specified by:
applyin interfaceFunction<HttpResponse,T>
-
apply
- Throws:
IOException
-
apply
- Throws:
IOException
-