Package org.apache.oodt.cas.pushpull.protocol

Examples of org.apache.oodt.cas.pushpull.protocol.Protocol


     */
    public Protocol getAppropriateProtocol(ProtocolFile pFile,
            boolean allowReuse, boolean navigateToPathLoc)
            throws RemoteConnectionException {
        try {
            Protocol protocol = getAppropriateProtocol(pFile, allowReuse);
            if (protocol != null && navigateToPathLoc) {
                if (pFile.isDirectory())
                    this.cd(protocol, pFile);
                else
                    this.cd(protocol, pFile.getParentFile());
View Full Code Here


                allowReuse);
    }

    public Protocol getAppropriateProtocolBySite(RemoteSite remoteSite,
            boolean allowReuse) throws ProtocolException {
        Protocol protocol = null;
        if ((allowReuse && ((protocol = reuseProtocols.get(remoteSite.getURL())) == null))
                || !allowReuse) {
            ProtocolFactory protocolFactory = this.urlAndProtocolFactory
                    .get(remoteSite.getURL());
            if (protocolFactory == null) {
View Full Code Here

        }
    }

    Protocol getNextAvaliableSession(ProtocolFile file) throws CrawlerException {
        // wait for available session, then load it
        Protocol session;
        while ((session = getSession(file)) == null) {
            try {
                waitMainThread();
            } catch (InterruptedException e1) {
            }
View Full Code Here

     *             If downloading session Protocol has to be reconnected and
     *             there is an error communicating with the server
     */
    synchronized Protocol getSession(ProtocolFile file) throws CrawlerException {
        try {
            Protocol session = null;
            if (avaliableSessions.size() > 0) {
                session = modifyAvailableSessionForPath(file);
            } else if (numberOfSessions < max_sessions) {
                session = createNewSessionForPath(file);
                incrementSessions();
View Full Code Here

        true);
    }

    Protocol modifyAvailableSessionForPath(ProtocolFile file)
            throws ProtocolException, RemoteConnectionException {
        Protocol session = getAvailableSession();
        if (!protocolHandler.getRemoteSite(session).getURL().getHost().equals(
                file.getURL().getHost())
                || !protocolHandler.isProtocolConnected(session)) {
            protocolHandler.disconnect(session);
            session = protocolHandler.getAppropriateProtocol(file, /* reuse */
 
View Full Code Here

        this.addToDownloadingList(remoteFile.getProtocolFile());
        threadController.execute(new Runnable() {
            public void run() {
                boolean successful = false;
                int retries = 0;
                Protocol curSession = session;

                if (FileRetrievalSystem.this.dListener != null)
                    FileRetrievalSystem.this.dListener
                            .downloadStarted(remoteFile.getProtocolFile());
View Full Code Here

        }
    }

    Protocol getNextAvaliableSession(ProtocolFile file) throws CrawlerException {
        // wait for available session, then load it
        Protocol session;
        while ((session = getSession(file)) == null) {
            try {
                waitMainThread();
            } catch (InterruptedException e1) {
            }
View Full Code Here

     *             If downloading session Protocol has to be reconnected and
     *             there is an error communicating with the server
     */
    synchronized Protocol getSession(ProtocolFile file) throws CrawlerException {
        try {
            Protocol session = null;
      if (file.getRemoteSite().getMaxConnections() < 0
          || file.getRemoteSite().getMaxConnections() > this.getCurrentlyDownloadingFiles().size()) {
              if (avaliableSessions.size() > 0) {
                  session = modifyAvailableSessionForPath(file);
              } else if (numberOfSessions < max_sessions) {
View Full Code Here

        true);
    }

    Protocol modifyAvailableSessionForPath(ProtocolFile file)
            throws ProtocolException, RemoteConnectionException {
        Protocol session = getAvailableSession();
        if (!protocolHandler.getRemoteSite(session).getURL().getHost().equals(
                file.getURL().getHost())
                || !protocolHandler.isProtocolConnected(session)) {
            protocolHandler.disconnect(session);
            session = protocolHandler.getAppropriateProtocol(file, /* reuse */
 
View Full Code Here

        this.addToDownloadingList(remoteFile.getProtocolFile());
        threadController.execute(new Runnable() {
            public void run() {
                boolean successful = false;
                int retries = 0;
                Protocol curSession = session;

                if (FileRetrievalSystem.this.dListener != null)
                    FileRetrievalSystem.this.dListener
                            .downloadStarted(remoteFile.getProtocolFile());
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.pushpull.protocol.Protocol

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.