Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

## juzu
Annotation Type MimeType

    @Retention(value=RUNTIME)
    @Target(value={METHOD,ANNOTATION_TYPE})
    public @interface MimeType

Associate a program element with a mime type.

Java controller methods can be annotated with this annotation to associate the controller response with a mime type automatically:

`

       @MimeType("text/html")
       public Response index() {
         return Response.ok("Hello world");
       }

`

t can also transform an existing annotation into a specialized mime type:

`

       @Retention(RetentionPolicy.RUNTIME)
       @Target({ElementType.METHOD})
       @MimeType("text/html")
       public @interface HTML {
       }

`

Such mime type can then be used to annotate controller methods:

`

       @HTML()
       public Response index() {
         return Response.ok("Hello world");
       }

`

Author:
  Julien Viet

Required Element Summary
`String[]` | `value`

Element Detail

### value

    public abstract String[] value

  Returns:
    the declarations of matched mime types.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

Copyright © 2014 eXo Platform SAS. All rights reserved.