Package org.atmosphere.handler

Examples of org.atmosphere.handler.AnnotatedProxy


    protected void mapAnnotatedService(boolean reMap, String path, AtmosphereRequest request, AtmosphereFramework.AtmosphereHandlerWrapper w) {
        synchronized (config.handlers()) {
            if (config.handlers().get(path) == null) {
                // ManagedService
                if (AnnotatedProxy.class.isAssignableFrom(w.atmosphereHandler.getClass())) {
                    AnnotatedProxy ap = AnnotatedProxy.class.cast(w.atmosphereHandler);
                    ManagedAnnotation a = managed(ap, request.resource());
                    if (a != null) {
                        String targetPath = a.path();
                        if (targetPath.indexOf("{") != -1 && targetPath.indexOf("}") != -1) {
                            try {
                                boolean singleton = ap.target().getClass().getAnnotation(Singleton.class) != null;
                                if (!singleton) {
                                    AnnotatedProxy h = proxyHandler();

                                    final Object o = config.framework().newClassInstance(Object.class, ap.target().getClass());
                                    h.configure(config, o);

                                    if (h.pathParams()) {
                                        prepareForPathInjection(path, targetPath, o);
                                    }

                                    config.framework().addAtmosphereHandler(path, h,
                                            config.getBroadcasterFactory().lookup(a.broadcaster(), path, true), w.interceptors);
View Full Code Here

TOP

Related Classes of org.atmosphere.handler.AnnotatedProxy

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.