Package javax.ws.rs

Examples of javax.ws.rs.ApplicationPath


            ServletRegistration.Dynamic dsr = sc.addServlet(a.getName(), s);
            dsr.setAsyncSupported(true);

            if (dsr.getMappings().isEmpty()) {
                final ApplicationPath ap = a.getAnnotation(ApplicationPath.class);
                if (ap != null) {
                    final String mapping = createMappingPath(ap);
                    if (!mappingExists(sc, mapping)) {
                        dsr.addMapping(mapping);
View Full Code Here


            Thread.currentThread().setContextClassLoader(oldLoader);
        }
    }

    private static String appPrefix(final WebAppInfo info, final Class<?> appClazz) {
        final ApplicationPath path = appClazz.getAnnotation(ApplicationPath.class);
        if (path != null) {
            final String appPath = path.value();
            if (appPath.startsWith("/")) {
                return appPath.substring(1);
            } else {
                return appPath;
            }
View Full Code Here

                    appInstance = Application.class.cast(appClazz.newInstance());
                } catch (Exception e) {
                    throw new OpenEJBRestRuntimeException("can't create class " + app, e);
                }

                ApplicationPath path = appClazz.getAnnotation(ApplicationPath.class);
                if (path != null) {
                    String appPath = path.value();
                    if (appPath.startsWith("/")) {
                        appPrefix += appPath.substring(1);
                    } else {
                        appPrefix += appPath;
                    }
View Full Code Here

                break;
            }
        }

        // annotation
        final ApplicationPath path = appClazz.getAnnotation(ApplicationPath.class);
        if (path != null) {
            final String appPath = path.value();

            if (builder == null) {
                builder = new StringBuilder();
            } else if (builder.length() > 0 && builder.charAt(builder.length() - 1) != '/') {
                builder.append('/');
View Full Code Here

        }
       
        JAXRSServerFactoryBean bean = new JAXRSServerFactoryBean();
        String address = "/";
        if (!ignoreAppPath) {
            ApplicationPath appPath = app.getClass().getAnnotation(ApplicationPath.class);
            if (appPath != null) {
                address = appPath.value().length() == 0 ? "/" : appPath.value();
            }
        }
        bean.setAddress(address);
        bean.setResourceClasses(resourceClasses);
        bean.setProviders(providers);
View Full Code Here

        }
       
        JAXRSServerFactoryBean bean = new JAXRSServerFactoryBean();
        String address = "/";
        if (!ignoreAppPath) {
            ApplicationPath appPath = app.getClass().getAnnotation(ApplicationPath.class);
            if (appPath != null) {
                address = appPath.value().length() == 0 ? "/" : appPath.value();
            }
        }
        bean.setAddress(address);
        bean.setResourceClasses(resourceClasses);
        bean.setProviders(providers);
View Full Code Here

        }
       
        JAXRSServerFactoryBean bean = new JAXRSServerFactoryBean();
        String address = "/";
        if (!ignoreAppPath) {
            ApplicationPath appPath = app.getClass().getAnnotation(ApplicationPath.class);
            if (appPath != null) {
                address = appPath.value().length() == 0 ? "/" : appPath.value();
            }
        }
        bean.setAddress(address);
        bean.setStaticSubresourceResolution(staticSubresourceResolution);
        bean.setResourceClasses(resourceClasses);
View Full Code Here

        }
       
        JAXRSServerFactoryBean bean = new JAXRSServerFactoryBean();
        String address = "/";
        if (!ignoreAppPath) {
            ApplicationPath appPath = app.getClass().getAnnotation(ApplicationPath.class);
            if (appPath != null) {
                address = appPath.value();
            }
        }
        if (!address.startsWith("/")) {
            address = "/" + address;
        }
View Full Code Here

  public static void init(Application app, play.GlobalSettings g) {
    parentClassloader = app.classloader();
    classes = RouterUtils.classes(parentClassloader);
    global = g;
    ApplicationPath appPathAnno = global.getClass().getAnnotation(ApplicationPath.class);
    if (appPathAnno != null)
      appPath = appPathAnno.value();

    routerClasses = parseRouterClasses(classes);

    String string = app.configuration().getString(ASSET_SERVING);
    if (string != null)
View Full Code Here

        }
       
        JAXRSServerFactoryBean bean = new JAXRSServerFactoryBean();
        String address = "/";
        if (!ignoreAppPath) {
            ApplicationPath appPath = app.getClass().getAnnotation(ApplicationPath.class);
            if (appPath != null) {
                address = appPath.value();
            }
        }
        if (!address.startsWith("/")) {
            address = "/" + address;
        }
View Full Code Here

TOP

Related Classes of javax.ws.rs.ApplicationPath

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.