Package org.apache.clerezza.triaxrs.util

Examples of org.apache.clerezza.triaxrs.util.UriInfoImpl


          parameterType + " having getClass(): " +
          parameterType.getClass());
    }

    if (clazz.isAssignableFrom(UriInfo.class)) {
      return (T) new UriInfoImpl(request);
    } else if (clazz.isAssignableFrom(WebRequest.class)) {
      //this also injects javax.ws.rs.core.Request
      return (T) request;
    } else if (clazz.isAssignableFrom(HttpHeaders.class)) {
      return (T) new HttpHeadersImpl(request);
View Full Code Here


  public ResponseBuilder location(URI location) {
    if (location == null) {
      headers.remove(HttpHeaders.LOCATION);
    }
    try {
      UriInfo uriInfo = new UriInfoImpl(JaxRsHandler.localRequest.get());
      URL baseUrl = uriInfo.getBaseUri().toURL();
      URL absolutizedUrl = new URL(baseUrl, location.toString());
      headers.putSingle(HttpHeaders.LOCATION, absolutizedUrl.toString());
      return this;
    } catch (MalformedURLException ex) {
      throw new RuntimeException(ex);
View Full Code Here

TOP

Related Classes of org.apache.clerezza.triaxrs.util.UriInfoImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.