Package org.apache.geronimo.core.service

Examples of org.apache.geronimo.core.service.Interceptor


    public Msg sendRequest(URI to, Msg msg) throws TransportException {
        try {
            routerLock.acquire();

            Interceptor interceptor = lookupInterceptorFrom(to);

            SimpleInvocation invocation = new SimpleInvocation();
            InvocationSupport.putMarshaledValue(invocation, msg.popMarshaledObject());
            InvocationSupport.putRemoteURI(invocation, to);

            InvocationResult result = interceptor.invoke(invocation);

            msg = msg.createMsg();
            Object rc = result.getResult();
            msg.pushMarshaledObject((MarshalledObject) rc);
            return msg;
View Full Code Here


    }

    public void sendDatagram(URI to, Msg msg) throws TransportException {
        try {
            routerLock.acquire();
            Interceptor interceptor = lookupInterceptorFrom(to);

            SimpleInvocation invocation = new SimpleInvocation();
            InvocationSupport.putMarshaledValue(invocation, msg.popMarshaledObject());
            InvocationSupport.putRemoteURI(invocation, to);

            interceptor.invoke(invocation);
        } catch (Throwable e) {
            throw new TransportException(e.getMessage());
        }
    }
View Full Code Here

        // Setup the server side contianer..
        LoginServiceMBean loginService = (LoginServiceMBean) MBeanProxyFactory.getProxy(LoginServiceMBean.class,
                kernel.getMBeanServer(),
                JMXUtil.getObjectName("geronimo.security:type=LoginService"));
        Interceptor firstInterceptor = new ReflexiveInterceptor(loginService);
        demarshaller = new DeMarshalingInterceptor(firstInterceptor, getClass().getClassLoader());
        serverContainer = new ProxyContainer(firstInterceptor);

        log.info("Started login service stub");
    }
View Full Code Here

        // Setup the client side container..
        RemoteTransportInterceptor remoteInterceptor = new RemoteTransportInterceptor(target);
        remoteInterceptor.setRemoteURI(target);

        Interceptor firstInterceptor = new MarshalingInterceptor(remoteInterceptor);
        firstInterceptor = new NotificationRemoterInterceptor(firstInterceptor);

        ProxyContainer clientContainer = new ProxyContainer(firstInterceptor);
        return (LoginServiceMBean) clientContainer.createProxy(LoginServiceMBean.class.getClassLoader(), new Class[]{LoginServiceMBean.class});
    }
View Full Code Here

        ExportedObject eo = (ExportedObject) exportedObjects.get(key);
        if (eo == null) {

            // Setup the server side contianer..
            eo = new ExportedObject();
            Interceptor ri = new ReflexiveInterceptor(object);
            DeMarshalingInterceptor demarshaller = new DeMarshalingInterceptor(ri, object.getClass().getClassLoader());
            Long dmiid = InterceptorRegistry.instance.register(demarshaller);
            eo.serverContainer = new ProxyContainer(demarshaller);

            // Build the RemoteRef for the object.
View Full Code Here

    }

    static public MBeanServer create(URI target) {

        // Setup the client side container..
        Interceptor firstInterceptor = new RemoteTransportInterceptor(target);
        firstInterceptor = new MarshalingInterceptor(firstInterceptor);
        firstInterceptor = new NotificationRemoterInterceptor(firstInterceptor);

        ProxyContainer clientContainer = new ProxyContainer(firstInterceptor);
        return (MBeanServer) clientContainer.createProxy(
View Full Code Here

    public void doStart() {
        router.register(objectName, this);

        // Setup the server side contianer..
        Interceptor firstInterceptor = new ReflexiveInterceptor(kernel.getMBeanServer());
        demarshaller = new DeMarshalingInterceptor(firstInterceptor, getClass().getClassLoader());
        serverContainer = new ProxyContainer(firstInterceptor);
    }
View Full Code Here

        // Setup the server side contianer..
        LoginServiceMBean loginService = (LoginServiceMBean) MBeanProxyFactory.getProxy(LoginServiceMBean.class,
                                                                                        context.getServer(),
                                                                                        JMXUtil.getObjectName("geronimo.security:type=LoginService"));
        Interceptor firstInterceptor = new ReflexiveInterceptor(loginService);
        demarshaller = new DeMarshalingInterceptor(firstInterceptor, getClass().getClassLoader());
        serverContainer = new ProxyContainer(firstInterceptor);
    }
View Full Code Here

        // Setup the client side container..
        RemoteTransportInterceptor remoteInterceptor = new RemoteTransportInterceptor(target);
        remoteInterceptor.setRemoteURI(target);

        Interceptor firstInterceptor = new MarshalingInterceptor(remoteInterceptor);
        firstInterceptor = new NotificationRemoterInterceptor(firstInterceptor);

        ProxyContainer clientContainer = new ProxyContainer(firstInterceptor);
        return (LoginServiceMBean) clientContainer.createProxy(LoginServiceMBean.class.getClassLoader(), new Class[]{LoginServiceMBean.class});
    }
View Full Code Here

    }

    static public MBeanServer create(URI target) {

        // Setup the client side container..
        Interceptor firstInterceptor = new RemoteTransportInterceptor(target);
        firstInterceptor = new MarshalingInterceptor(firstInterceptor);
        firstInterceptor = new NotificationRemoterInterceptor(firstInterceptor);

        ProxyContainer clientContainer = new ProxyContainer(firstInterceptor);
        return (MBeanServer) clientContainer.createProxy(
View Full Code Here

TOP

Related Classes of org.apache.geronimo.core.service.Interceptor

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.