uCosminexus Application Server, Web Service Development Guide

[Contents][Glossary][Index][Back][Next]

getEntity(GenericType<T> gt) method

Description

This method acquires an entity of an HTTP response. If the acquired entity is not an instance of the class that implemented the Closeable interface, the input stream is closed.

Syntax

public <T> T getEntity(GenericType<T> gt)

throws ClientHandlerException,

UniformInterfaceException

Parameter

gt
This is a GenericType object that represents the entity type.

Return value

The method returns the object of the type expressed by the specified GenericType object.

Exception

ClientHandlerException
This exception is thrown if a problem occurs during processing. The error message KDJJ18888-E is output to the log.

UniformInterfaceException
This exception is thrown if the HTTP status code is 204 No Content. The error message KDJJ18888-E is output to the log.

Notes