uCosminexus Application Server, Web Service Development Guide

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

getEntity(Class<T> c) 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(Class<T> c)

throws ClientHandlerException,

UniformInterfaceException

Parameter

c
This is an entity type.

Return value

The method returns the object of the specified type.

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