Package org.apache.jackrabbit.rmi.client

Examples of org.apache.jackrabbit.rmi.client.ClientAdapterFactory


     * @param iface adapter interface
     * @throws Exception on errors
     */
    private void prepareTests(Class iface) throws Exception {
        remoteFactory = new ServerAdapterFactory();
        localFactory = new ClientAdapterFactory();

        methods = new HashMap();
        Method[] m = iface.getDeclaredMethods();
        for (int i = 0; i < m.length; i++) {
            methods.put(m[i].getName(), m[i]);
View Full Code Here


     * @param iface adapter interface
     * @throws Exception on errors
     */
    private void prepareTests(Class iface) throws Exception {
        remoteFactory = new ServerAdapterFactory();
        localFactory = new ClientAdapterFactory();

        methods = new HashMap();
        Method[] m = iface.getDeclaredMethods();
        for (int i = 0; i < m.length; i++) {
            methods.put(m[i].getName(), m[i]);
View Full Code Here

    }

    @SuppressWarnings("rawtypes")
    private Repository getJndiRepository(final String name,
            final Hashtable environment) throws RepositoryException {
        return new RmiSafeClientRepository(new ClientAdapterFactory()) {

            @Override
            protected RemoteRepository getRemoteRepository() throws RemoteException {
                try {
                    Object value = new InitialContext(environment).lookup(name);
View Full Code Here

        };
    }

    private Repository getRmiRepository(final String name)
            throws RepositoryException {
        return new RmiSafeClientRepository(new ClientAdapterFactory()) {

            @Override
            protected RemoteRepository getRemoteRepository() throws RemoteException {
                try {
                    Object value = Naming.lookup(name);
View Full Code Here

     * local adapter factory.
     *
     * @param url URL of the remote repository
     */
    public RMIRemoteRepository(String url) {
        this(new ClientAdapterFactory(), url);
    }
View Full Code Here

     * local adapter factory.
     *
     * @param url URL of the remote repository
     */
    public URLRemoteRepository(URL url) {
        this(new ClientAdapterFactory(), url);
    }
View Full Code Here

     *
     * @param context JNDI context
     * @param location JNDI location
     */
    public JNDIRemoteRepository(Context context, String location) {
        this(new ClientAdapterFactory(), context, location);
    }
View Full Code Here

        }
    }

    private Repository getUrlRepository(final URL url)
            throws RepositoryException {
        return new RmiSafeClientRepository(new ClientAdapterFactory()) {

            @Override
            protected RemoteRepository getRemoteRepository() throws RemoteException {
                try {
                    InputStream stream = url.openStream();
View Full Code Here

    String url = (String) ctx.get(this.urlKey);
    if (log.isDebugEnabled()) {
      log.debug("connecting to jndi server at " + url);
    }
    InitialContext iCtx = new InitialContext();
    ClientAdapterFactory adapter = new ClientAdapterFactory();
    RemoteRepository remote = (RemoteRepository) iCtx.lookup(url);
    Repository repo = adapter.getRepository(remote);
    CommandHelper.setRepository(ctx, repo, "jndi " + url);
    return false;
  }
View Full Code Here

                oos.writeObject(RemoteObject.toStub(remote));
                oos.close();

                ObjectInputStream ois = new ObjectInputStream(
                        new ByteArrayInputStream(buffer.toByteArray()));
                LocalAdapterFactory laf = new ClientAdapterFactory();
                repository =
                    laf.getRepository((RemoteRepository) ois.readObject());
            } catch (Exception e) {
                throw new RepositoryStubException(e);
            }
        }
        return repository;
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.rmi.client.ClientAdapterFactory

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.