Package org.primefaces.push.annotation

Examples of org.primefaces.push.annotation.PushEndpoint


    //@Override
    public void handle(AtmosphereFramework framework, Class<Object> annotatedClass) {
        try {
            Class<?> aClass = annotatedClass;
            PushEndpoint a = aClass.getAnnotation(PushEndpoint.class);
            List<AtmosphereInterceptor> l = new ArrayList<AtmosphereInterceptor>();

            Object c = framework.newClassInstance(Object.class, aClass);
            AtmosphereHandler handler = framework.newClassInstance(PushEndpointHandlerProxy.class, PushEndpointHandlerProxy.class).configure(framework.getAtmosphereConfig(), c);
            l.add(framework.newClassInstance(AtmosphereInterceptor.class, PushEndpointInterceptor.class));

            Class<? extends Broadcaster> b = (Class<? extends Broadcaster>) IOUtils.loadClass(this.getClass(), framework.getDefaultBroadcasterClassName());

            framework.addAtmosphereHandler(a.value(), handler, broadcaster(framework, b, a.value()), l);
        } catch (Throwable e) {
            logger.warn("", e);
        }
    }
View Full Code Here


    protected AnnotatedProxy proxyHandler() throws IllegalAccessException, InstantiationException {
        return config.framework().newClassInstance(AnnotatedProxy.class, PushEndpointHandlerProxy.class);
    }

    protected ManagedAnnotation managed(AnnotatedProxy ap, final AtmosphereResource r) {
        final PushEndpoint a = ap.target().getClass().getAnnotation(PushEndpoint.class);
        if (a == null) return null;

        return new ManagedAnnotation() {
            public String path() {
                return a.value();
            }

            public Class<? extends Broadcaster> broadcaster() {
                return r.getBroadcaster().getClass();
            }
View Full Code Here

TOP

Related Classes of org.primefaces.push.annotation.PushEndpoint

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.