All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jboss.resteasy.annotations.ClientResponseType Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
package org.jboss.resteasy.annotations;

import org.jboss.resteasy.client.EntityTypeFactory;
import org.jboss.resteasy.client.core.VoidEntityTypeFactory;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * This is an annotation that you can add to a RESTEasy client interface that
 * has a return type of Response.
 * 

*

* You have two options: *

    *
  1. use the entityType property to set a Class that will always be returned *
  2. use the entityTypeFactory to determine which Class to use based on a * factory that determines which class to use based on logic that uses the * headers and status of the result. *
*

* Note: if you want to use generic types, you can't use this annotation. You'll * have to either use ClientResponse as part of your interface, or cast the * resulting Response object as a ClientResponse. * * @author Solomon Duskis * @version $Revision: 1 $ */ @Target({ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @SuppressWarnings("unchecked") public @interface ClientResponseType { Class entityType() default Void.class; Class entityTypeFactory() default VoidEntityTypeFactory.class; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy