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

org.jboss.resteasy.spi.metadata.DefaultResourceMethod Maven / Gradle / Ivy

The newest version!
package org.jboss.resteasy.spi.metadata;

import javax.ws.rs.core.MediaType;

import java.lang.reflect.Method;
import java.util.HashSet;
import java.util.Set;

/**
 * @author Bill Burke
 * @version $Revision: 1 $
 */
public class DefaultResourceMethod extends DefaultResourceLocator implements ResourceMethod
{
   private static final MediaType[] empty = {};
   protected Set httpMethods = new HashSet();
   protected MediaType[] produces = empty;
   protected MediaType[] consumes = empty;
   protected boolean asynchronous;

   public DefaultResourceMethod(ResourceClass declaredClass, Method method, Method annotatedMethod)
   {
      super(declaredClass, method, annotatedMethod);
   }

   @Override
   public Set getHttpMethods()
   {
      return httpMethods;
   }

   @Override
   public MediaType[] getProduces()
   {
      return produces;
   }

   @Override
   public MediaType[] getConsumes()
   {
      return consumes;
   }

   @Override
   public boolean isAsynchronous()
   {
      return asynchronous;
   }

   @Override
   public void markAsynchronous()
   {
      asynchronous = true;
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy