vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/HttpResource.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Fri, 08 Feb 2013 11:12:02 +0100
changeset 704 4fe8b3dfc55f
parent 623 4af0d3dedb9d
permissions -rw-r--r--
Proper implementation of System.currentTimeMillis with so desired test
jaroslav@623
     1
/**
jaroslav@623
     2
 * Back 2 Browser Bytecode Translator
jaroslav@623
     3
 * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
jaroslav@623
     4
 *
jaroslav@623
     5
 * This program is free software: you can redistribute it and/or modify
jaroslav@623
     6
 * it under the terms of the GNU General Public License as published by
jaroslav@623
     7
 * the Free Software Foundation, version 2 of the License.
jaroslav@623
     8
 *
jaroslav@623
     9
 * This program is distributed in the hope that it will be useful,
jaroslav@623
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
jaroslav@623
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
jaroslav@623
    12
 * GNU General Public License for more details.
jaroslav@623
    13
 *
jaroslav@623
    14
 * You should have received a copy of the GNU General Public License
jaroslav@623
    15
 * along with this program. Look for COPYING file in the top folder.
jaroslav@623
    16
 * If not, see http://opensource.org/licenses/GPL-2.0.
jaroslav@623
    17
 */
jaroslav@623
    18
package org.apidesign.bck2brwsr.vmtest;
jaroslav@623
    19
jaroslav@623
    20
import java.lang.annotation.ElementType;
jaroslav@623
    21
import java.lang.annotation.Retention;
jaroslav@623
    22
import java.lang.annotation.RetentionPolicy;
jaroslav@623
    23
import java.lang.annotation.Target;
jaroslav@623
    24
jaroslav@623
    25
/** Exposes an HTTP page to the running {@link BrwsrTest}, so it can access
jaroslav@623
    26
 * under the relative path.
jaroslav@623
    27
 *
jaroslav@623
    28
 * @author Jaroslav Tulach <jtulach@netbeans.org>
jaroslav@623
    29
 */
jaroslav@623
    30
@Retention(RetentionPolicy.RUNTIME)
jaroslav@623
    31
@Target({ ElementType.METHOD, ElementType.TYPE})
jaroslav@623
    32
public @interface HttpResource {
jaroslav@623
    33
    /** path on the server that the test can use to access the exposed resource */
jaroslav@623
    34
    String path();
jaroslav@623
    35
    /** the content of the HttpResource */
jaroslav@623
    36
    String content();
jaroslav@626
    37
    /** resource relative to the class that should be used instead of <code>content</code>.
jaroslav@626
    38
     * Leave content equal to empty string.
jaroslav@626
    39
     */
jaroslav@626
    40
    String resource() default "";
jaroslav@623
    41
    /** mime type of the resource */
jaroslav@623
    42
    String mimeType();
jaroslav@623
    43
}