Search in sources :

Example 1 with DoDelete

use of com.tvd12.ezyhttp.server.core.annotation.DoDelete in project ezyhttp by youngmonkeys.

the class RequestHandlerMethod method fetchResponseType.

protected String fetchResponseType() {
    DoGet doGet = method.getAnnotation(DoGet.class);
    if (doGet != null) {
        return DoGetAnnotations.getResponseType(doGet);
    }
    DoPost doPost = method.getAnnotation(DoPost.class);
    if (doPost != null) {
        return DoPostAnnotations.getResponseType(doPost);
    }
    DoPut doPut = method.getAnnotation(DoPut.class);
    if (doPut != null) {
        return DoPutAnnotations.getResponseType(doPut);
    }
    DoDelete doDelete = method.getAnnotation(DoDelete.class);
    return DoDeleteAnnotations.getResponseType(doDelete);
}
Also used : DoPost(com.tvd12.ezyhttp.server.core.annotation.DoPost) DoPut(com.tvd12.ezyhttp.server.core.annotation.DoPut) DoDelete(com.tvd12.ezyhttp.server.core.annotation.DoDelete) DoGet(com.tvd12.ezyhttp.server.core.annotation.DoGet)

Example 2 with DoDelete

use of com.tvd12.ezyhttp.server.core.annotation.DoDelete in project ezyhttp by youngmonkeys.

the class RequestHandlerMethod method fetchRequestURIFragment.

protected String fetchRequestURIFragment() {
    DoGet doGet = method.getAnnotation(DoGet.class);
    if (doGet != null) {
        return DoGetAnnotations.getURI(doGet);
    }
    DoPost doPost = method.getAnnotation(DoPost.class);
    if (doPost != null) {
        return DoPostAnnotations.getURI(doPost);
    }
    DoPut doPut = method.getAnnotation(DoPut.class);
    if (doPut != null) {
        return DoPutAnnotations.getURI(doPut);
    }
    DoDelete doDelete = method.getAnnotation(DoDelete.class);
    return DoDeleteAnnotations.getURI(doDelete);
}
Also used : DoPost(com.tvd12.ezyhttp.server.core.annotation.DoPost) DoPut(com.tvd12.ezyhttp.server.core.annotation.DoPut) DoDelete(com.tvd12.ezyhttp.server.core.annotation.DoDelete) DoGet(com.tvd12.ezyhttp.server.core.annotation.DoGet)

Aggregations

DoDelete (com.tvd12.ezyhttp.server.core.annotation.DoDelete)2 DoGet (com.tvd12.ezyhttp.server.core.annotation.DoGet)2 DoPost (com.tvd12.ezyhttp.server.core.annotation.DoPost)2 DoPut (com.tvd12.ezyhttp.server.core.annotation.DoPut)2