Package org.apache.hivemind.impl

Examples of org.apache.hivemind.impl.ConstructableServicePoint


     * method re-invoke on _service(). Adds a toString() method if the service interface does not
     * define toString().
     */
    private Class createSingletonProxyClass()
    {
        ConstructableServicePoint servicePoint = getServicePoint();

        ProxyBuilder proxyBuilder = new ProxyBuilder("SingletonProxy", servicePoint, true);

        ClassFab classFab = proxyBuilder.getClassFab();

        Class serviceInterface = servicePoint.getServiceInterface();

        // This will initally be the inner proxy, then switch over to the
        // service implementation.

        classFab.addField("_inner", serviceInterface);
View Full Code Here


    /**
     * Constructs the service proxy and returns it, wrapped in any interceptors.
     */
    private Object constructServiceProxy()
    {
        ConstructableServicePoint servicePoint = getServicePoint();

        if (_log.isDebugEnabled())
            _log.debug("Creating PooledProxy for service " + servicePoint.getExtensionPointId());

        Object proxy = ProxyUtils.createDelegatingProxy(
                "PooledProxy",
                this,
                "getServiceImplementationForCurrentThread",
                servicePoint);

        Object intercepted = addInterceptors(proxy);

        RegistryShutdownListener outerProxy = ProxyUtils
                .createOuterProxy(intercepted, servicePoint);

        ShutdownCoordinator coordinator = servicePoint.getShutdownCoordinator();

        coordinator.addRegistryShutdownListener(outerProxy);

        return outerProxy;
    }
View Full Code Here

     * Creates a proxy instance for the service, and returns it, wrapped in any interceptors for the
     * service.
     */
    private Object createServiceProxy()
    {
        ConstructableServicePoint servicePoint = getServicePoint();

        if (_log.isDebugEnabled())
            _log.debug("Creating ThreadedProxy for service " + servicePoint.getExtensionPointId());

        Object proxy = ProxyUtils.createDelegatingProxy(
                "ThreadedProxy",
                this,
                "getServiceImplementationForCurrentThread",
                servicePoint);

        Object intercepted = addInterceptors(proxy);

        RegistryShutdownListener outerProxy = ProxyUtils
                .createOuterProxy(intercepted, servicePoint);

        servicePoint.addRegistryShutdownListener(outerProxy);

        return outerProxy;
    }
View Full Code Here

    /**
     * Constructs the service proxy and returns it, wrapped in any interceptors.
     */
    private Object constructServiceProxy()
    {
        ConstructableServicePoint servicePoint = getServicePoint();

        if (_log.isDebugEnabled())
            _log.debug("Creating PooledProxy for service " + servicePoint.getExtensionPointId());

        Object proxy = ProxyUtils.createDelegatingProxy(
                "PooledProxy",
                this,
                "getServiceImplementationForCurrentThread",
                servicePoint);

        Object intercepted = addInterceptors(proxy);

        RegistryShutdownListener outerProxy = ProxyUtils
                .createOuterProxy(intercepted, servicePoint);

        servicePoint.addRegistryShutdownListener(outerProxy);

        return outerProxy;
    }
View Full Code Here

     * method re-invoke on _service(). Adds a toString() method if the service interface does not
     * define toString().
     */
    private Class createSingletonProxyClass()
    {
        ConstructableServicePoint servicePoint = getServicePoint();

        ProxyBuilder proxyBuilder = new ProxyBuilder("SingletonProxy", servicePoint.getModule(),
                servicePoint.getServiceInterface(), servicePoint.getDeclaredInterface(), true);

        ClassFab classFab = proxyBuilder.getClassFab();

        Class serviceInterface = servicePoint.getServiceInterface();

        // This will initally be the inner proxy, then switch over to the
        // service implementation.

        classFab.addField("_inner", serviceInterface);
View Full Code Here

    /**
     * Constructs the service proxy and returns it, wrapped in any interceptors.
     */
    private Object constructServiceProxy()
    {
        ConstructableServicePoint servicePoint = getServicePoint();

        if (_log.isDebugEnabled())
            _log.debug("Creating PooledProxy for service " + servicePoint.getExtensionPointId());

        Object proxy = ProxyUtils.createDelegatingProxy(
                "PooledProxy",
                this,
                "getServiceImplementationForCurrentThread",
                servicePoint);

        Object intercepted = addInterceptors(proxy);

        RegistryShutdownListener outerProxy = ProxyUtils
                .createOuterProxy(intercepted, servicePoint);

        ShutdownCoordinator coordinator = servicePoint.getShutdownCoordinator();

        coordinator.addRegistryShutdownListener(outerProxy);

        return outerProxy;
    }
View Full Code Here

     * method re-invoke on _service(). Adds a toString() method if the service interface does not
     * define toString().
     */
    private Class createSingletonProxyClass()
    {
        ConstructableServicePoint servicePoint = getServicePoint();

        ProxyBuilder proxyBuilder = new ProxyBuilder("SingletonProxy", servicePoint, true);

        ClassFab classFab = proxyBuilder.getClassFab();

        Class serviceInterface = servicePoint.getServiceInterface();

        // This will initally be the inner proxy, then switch over to the
        // service implementation.

        classFab.addField("_inner", serviceInterface);
View Full Code Here

     * Creates a proxy instance for the service, and returns it, wrapped in any interceptors for the
     * service.
     */
    private Object createServiceProxy()
    {
        ConstructableServicePoint servicePoint = getServicePoint();

        if (_log.isDebugEnabled())
            _log.debug("Creating ThreadedProxy for service " + servicePoint.getExtensionPointId());

        Object proxy = ProxyUtils.createDelegatingProxy(
                "ThreadedProxy",
                this,
                "getServiceImplementationForCurrentThread",
                servicePoint);

        Object intercepted = addInterceptors(proxy);

        RegistryShutdownListener outerProxy = ProxyUtils
                .createOuterProxy(intercepted, servicePoint);

        ShutdownCoordinator coordinator = servicePoint.getShutdownCoordinator();

        coordinator.addRegistryShutdownListener(outerProxy);

        return outerProxy;
    }
View Full Code Here

     * Creates a proxy instance for the service, and returns it, wrapped in any interceptors for the
     * service.
     */
    private Object createServiceProxy()
    {
        ConstructableServicePoint servicePoint = getServicePoint();

        if (_log.isDebugEnabled())
            _log.debug("Creating ThreadedProxy for service " + servicePoint.getExtensionPointId());

        Object proxy = ProxyUtils.createDelegatingProxy(
                "ThreadedProxy",
                this,
                "getServiceImplementationForCurrentThread",
                servicePoint);

        Object intercepted = addInterceptors(proxy);

        RegistryShutdownListener outerProxy = ProxyUtils
                .createOuterProxy(intercepted, servicePoint);

        ShutdownCoordinator coordinator = servicePoint.getShutdownCoordinator();

        coordinator.addRegistryShutdownListener(outerProxy);

        return outerProxy;
    }
View Full Code Here

     * as needed, and has each service interface method re-invoke on _service().
     * Adds a toString() method if the service interface does not define toString().
     */
    private Class createSingletonProxyClass()
    {
        ConstructableServicePoint servicePoint = getServicePoint();

        ProxyBuilder proxyBuilder = new ProxyBuilder("SingletonProxy", servicePoint);

        ClassFab classFab = proxyBuilder.getClassFab();

        Class serviceInterface = servicePoint.getServiceInterface();

        // This will initally be the inner proxy, then switch over to the
        // service implementation.

        classFab.addField("_inner", serviceInterface);
View Full Code Here

TOP

Related Classes of org.apache.hivemind.impl.ConstructableServicePoint

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.