Package org.gradle.messaging.dispatch

Examples of org.gradle.messaging.dispatch.ReflectionDispatch


        this.classLoader = classLoader;
        this.connection = connection;
    }

    public <T> void addIncoming(Class<T> type, T instance) {
        addIncoming(type, new ReflectionDispatch(instance));
    }
View Full Code Here


            }
        }

        public void maybeSetLogger(Object logger) {
            if (type.isInstance(logger)) {
                dispatch = new ReflectionDispatch(logger);
            }
        }
View Full Code Here

    /**
     * Creates a proxy which dispatches to the given target object.
     */
    public ContextClassLoaderProxy(Class<T> type, T target, ClassLoader contextClassLoader) {
        adapter = new ProxyDispatchAdapter<T>(type, new ContextClassLoaderDispatch<MethodInvocation>(new ReflectionDispatch(target), contextClassLoader));
    }
View Full Code Here

    public void add(Dispatch<MethodInvocation> dispatch) {
        handlers.put(dispatch, dispatch);
    }

    public void add(T listener) {
        handlers.put(listener, new ReflectionDispatch(listener));
    }
View Full Code Here

            }
        }

        public void maybeSetLogger(Object logger) {
            if (type.isInstance(logger)) {
                dispatch = new ReflectionDispatch(logger);
            }
        }
View Full Code Here

    }

    public Actor createBlockingActor(final Object target) {
        return new Actor() {
            public <T> T getProxy(Class<T> type) {
                return new ProxyDispatchAdapter<T>(new ReflectionDispatch(target), type, ThreadSafe.class).getSource();
            }

            public void stop() throws DispatchException {
            }
View Full Code Here

    public <T> void addIncoming(Class<T> type, T instance) {
        if (methodParamClassLoader == null) {
            methodParamClassLoader = type.getClassLoader();
        }
        hub.addHandler(type.getName(), new ReflectionDispatch(instance));
    }
View Full Code Here

                protocolStack.getTop().dispatch(new ChannelAvailable(messageOriginator, group, channelKey, address));
            }
        } finally {
            lock.unlock();
        }
        hub.addIncoming(channelKey, new TypeCastDispatch<MethodInvocation, Object>(MethodInvocation.class, new ReflectionDispatch(handler)));
    }
View Full Code Here

TOP

Related Classes of org.gradle.messaging.dispatch.ReflectionDispatch

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.