Package org.exolab.jms.net.proxy

Examples of org.exolab.jms.net.proxy.Proxy


     * @param uri the connection URI
     * @return a proxy for the object
     * @throws ExportException if the proxy can't be constructed
     */
    public synchronized Proxy addProxy(URI uri) throws ExportException {
        Proxy proxy;
        try {
            Delegate delegate = new UnicastDelegate(_objID, uri.toString());
            Constructor constructor = _proxyClass.getConstructor(PROXY_ARGS);
            proxy = (Proxy) constructor.newInstance(new Object[]{delegate});
        } catch (InvocationTargetException exception) {
View Full Code Here


     *                               specified URI
     */
    public synchronized Proxy getProxy(URI uri)
            throws NoSuchObjectException {

        Proxy proxy = (Proxy) _proxies.get(uri);
        if (proxy == null) {
            throw new NoSuchObjectException(
                    "Object not exported on URI=" + uri);
        }
        return proxy;
View Full Code Here

            parsed = URIHelper.parse(uri);
        } catch (InvalidURIException exception) {
            throw new ExportException(exception.getMessage(), exception);
        }

        Proxy proxy = null;
        ObjectRef ref = (ObjectRef) _objectMap.get(object);
        if (ref != null) {
            proxy = addProxy(ref, parsed, object, ref.getProxyClass());
        } else {
            ObjID objID = new ObjID();
View Full Code Here

            parsed = URIHelper.parse(uri);
        } catch (InvalidURIException exception) {
            throw new ExportException(exception.getMessage(), exception);

        }
        Proxy proxy = null;
        ObjectRef ref = (ObjectRef) _objectMap.get(object);
        if (ref != null) {
            proxy = addProxy(ref, parsed, object, ref.getProxyClass());
        } else {
            proxy = doExport(object, objID, parsed, getProxyClass(object));
View Full Code Here

     * @throws ExportException if the object cannot be exported
     * @throws StubNotFoundException if the proxy class cannot be found
     */
    protected Proxy doExportTo(Object object, URI uri)
            throws ExportException, StubNotFoundException {
        Proxy proxy = null;
        ObjectRef ref = (ObjectRef) _objectMap.get(object);
        if (ref != null) {
            proxy = addProxyTo(ref, uri, object, ref.getProxyClass());
        } else {
            ObjID objID = new ObjID();
View Full Code Here

     * registry
     */
    public EchoServer(String uri)
        throws AlreadyBoundException, RemoteException {
        _orb = ORBFactory.createORB(uri);
        Proxy proxy = _orb.exportObject(new EchoServiceImpl());
        _orb.getRegistry().bind(ECHO_SERVICE, proxy);
      }
View Full Code Here

        orb.getRegistry().bind(ECHO_SERVICE, _service);

        // make sure a valid user can perform a lookup
        Registry registry = getRegistry(principal);
        assertNotNull(registry);
        Proxy proxy = registry.lookup(ECHO_SERVICE);
        assertTrue(proxy instanceof EchoService);

        // make sure an invalid user throws AccessException
        try {
            registry = getRegistry();
View Full Code Here

        }

        // bind it via the local instance and verify it can be looked
        // up via the proxy
        local.bind(ECHO_SERVICE, _service);
        Proxy proxy = remote.lookup(ECHO_SERVICE);
        assertNotNull(proxy);
        assertTrue(proxy instanceof EchoService);       

        // attempt to unbind the service via the proxy
        try {
View Full Code Here

     * @throws Exception for any error
     */
    private void checkLookup(Registry registry) throws Exception {
        // bind the service, and look it up
        registry.bind(ECHO_SERVICE, _service);
        Proxy proxy = registry.lookup(ECHO_SERVICE);
        assertNotNull(proxy);
        assertTrue(proxy instanceof EchoService);
    }
View Full Code Here

        if (orb == null) {
            throw new IllegalArgumentException("Argument 'orb' is null");
        }
        _session = session;
        _orb = orb;
        Proxy proxy = orb.exportObjectTo(this, uri, principal, credentials);
        _session.setMessageListener((JmsMessageListener) proxy);
    }
View Full Code Here

TOP

Related Classes of org.exolab.jms.net.proxy.Proxy

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.