Package org.apache.oodt.cas.protocol

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


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


        true);
    }

    Protocol modifyAvailableSessionForPath(RemoteSiteFile file)
            throws ProtocolException, RemoteConnectionException {
        Protocol session = getAvailableSession();
        if (!file.getSite().getURL().getHost().equals(
                file.getSite().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

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

    return this.getAppropriateProtocolBySite(pFile.getSite(), 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

TOP

Related Classes of org.apache.oodt.cas.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.