当前位置: 首页>>代码示例>>Java>>正文


Java AuthenticationException类代码示例

本文整理汇总了Java中org.netbeans.lib.cvsclient.connection.AuthenticationException的典型用法代码示例。如果您正苦于以下问题:Java AuthenticationException类的具体用法?Java AuthenticationException怎么用?Java AuthenticationException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AuthenticationException类属于org.netbeans.lib.cvsclient.connection包,在下文中一共展示了AuthenticationException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: execute

import org.netbeans.lib.cvsclient.connection.AuthenticationException; //导入依赖的package包/类
protected synchronized void execute(GeneralCommandLine commandLine) throws AuthenticationException {
  try {
    commandLine.withParentEnvironmentType(ParentEnvironmentType.CONSOLE);
    myProcess = commandLine.createProcess();

    myErrThread = new ReadProcessThread(
      new BufferedReader(new InputStreamReader(myProcess.getErrorStream(), EncodingManager.getInstance().getDefaultCharset()))) {
      protected void textAvailable(String s) {
        myErrorText.append(s);
        myErrorRegistry.registerError(s);
        myContainsError = true;
      }
    };
    final Application application = ApplicationManager.getApplication();
    myStdErrFuture = application.executeOnPooledThread(myErrThread);

    myInputStream = myProcess.getInputStream();
    myOutputStream = myProcess.getOutputStream();

    waitForProcess(application);
  }
  catch (Exception e) {
    closeInternal();
    throw new AuthenticationException(e.getLocalizedMessage(), e);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:ConnectionOnProcess.java

示例2: SshSharedConnection

import org.netbeans.lib.cvsclient.connection.AuthenticationException; //导入依赖的package包/类
public SshSharedConnection(final String repository, final ConnectionSettings connectionSettings, final SshAuthentication authentication) {
  myValid = new AtomicBoolean(true);
  myRepository = repository;
  myConnectionSettings = connectionSettings;
  myLock = new Object();

  myConnectionFactory = new ThrowableComputable<Connection, AuthenticationException>() {
    public Connection compute() throws AuthenticationException {
      try {
        SshLogger.debug("connection factory called");
        return SshConnectionUtils.openConnection(connectionSettings, authentication);
      }
      catch (AuthenticationException e) {
        // todo +-
        myValid.set(false);
        throw e;
      } catch (IOException e) {
        // todo +-
        myValid.set(false);
        throw new AuthenticationException(e.getMessage(), e);
      }
    }
  };
  myQueue = new LinkedList<Cell>();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:SshSharedConnection.java

示例3: execute

import org.netbeans.lib.cvsclient.connection.AuthenticationException; //导入依赖的package包/类
public boolean execute(IRequestProcessor requestProcessor, IEventSender eventManager, ICvsListenerRegistry listenerRegistry, IClientEnvironment clientEnvironment, IProgressViewer progressViewer) throws CommandException,
                                                                                                                                                                                                                 AuthenticationException {
	BugLog.getInstance().assertNotNull(keywordSubstitution);

	final ICvsFiles cvsFiles;
	try {
		cvsFiles = scanFileSystem(clientEnvironment);
	}
	catch (IOException ex) {
		throw new IOCommandException(ex);
	}

	final Requests requests = new Requests(CommandRequest.ADMIN, clientEnvironment);
	requests.addArgumentRequest(keywordSubstitution, "-k");
	addFileRequests(cvsFiles, requests, clientEnvironment);
	requests.addLocalPathDirectoryRequest();
	addArgumentRequests(requests);

	return requestProcessor.processRequests(requests, FileStateRequestsProgressHandler.create(progressViewer, cvsFiles));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:ChangeKeywordSubstCommand.java

示例4: execute

import org.netbeans.lib.cvsclient.connection.AuthenticationException; //导入依赖的package包/类
public boolean execute(IRequestProcessor requestProcessor, IEventSender eventManager, ICvsListenerRegistry listenerRegistry, IClientEnvironment clientEnvironment, IProgressViewer progressViewer) throws CommandException,
                                                                                                                                                                                                                 AuthenticationException {
	BugLog.getInstance().assertTrue(isSetLock() || isResetLock(), "Nothing specified");

	final ICvsFiles cvsFiles;
	try {
		cvsFiles = scanFileSystem(clientEnvironment);
	}
	catch (IOException ex) {
		throw new IOCommandException(ex);
	}

	final Requests requests = new Requests(CommandRequest.ADMIN, clientEnvironment);
	requests.addArgumentRequest(isSetLock(), "-l");
	requests.addArgumentRequest(isResetLock(), "-u");
	addFileRequests(cvsFiles, requests, clientEnvironment);
	requests.addLocalPathDirectoryRequest();
	addArgumentRequests(requests);

	final IRequestsProgressHandler requestsProgressHandler = FileStateRequestsProgressHandler.create(progressViewer, cvsFiles);
	return requestProcessor.processRequests(requests, requestsProgressHandler);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:AdminCommand.java

示例5: loginAll

import org.netbeans.lib.cvsclient.connection.AuthenticationException; //导入依赖的package包/类
public boolean loginAll(final boolean goOffline) {
  for (CvsEnvironment root : myRoots) {
    final CvsLoginWorker worker = root.getLoginWorker(myProject);

    try {
      final ThreeState checkResult = checkLoginWorker(worker, myForceCheck);
      if (! ThreeState.YES.equals(checkResult)) {
        if (ThreeState.UNSURE.equals(checkResult)) {
          if (goOffline) {
            worker.goOffline();
          }
          myExceptionConsumer.consume(new CvsException("Authentication canceled", root.getCvsRootAsString()));
        }
        return false;
      }
    } catch (AuthenticationException e) {
      myExceptionConsumer.consume(new CvsException(e, root.getCvsRootAsString()));
      return false;
    }
  }
  return true;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:LoginPerformer.java

示例6: silentLogin

import org.netbeans.lib.cvsclient.connection.AuthenticationException; //导入依赖的package包/类
@Override
public ThreeState silentLogin(boolean forceCheck) throws AuthenticationException {
  if (mySettings.isOffline())  return ThreeState.NO;

  try {
    silentLoginImpl(forceCheck);
  }
  catch (AuthenticationException e) {
    if (e.isSolveable()) {
      clearOldCredentials();
      return ThreeState.UNSURE;
    }
    throw e;
  }
  return ThreeState.YES;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:CvsLoginWorkerImpl.java

示例7: silentLoginImpl

import org.netbeans.lib.cvsclient.connection.AuthenticationException; //导入依赖的package包/类
@Override
protected void silentLoginImpl(boolean forceCheck) throws AuthenticationException {
  IConnection connection = mySettings.createConnection(new ReadWriteStatistics());
  try {
    connection.open(new StreamLogger());
    mySettings.setOffline(false);
  }
  finally {
    try {
      connection.close();
    }
    catch (IOException e) {
      LOG.info(e);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:ExtConnectionCvsSettings.java

示例8: execute

import org.netbeans.lib.cvsclient.connection.AuthenticationException; //导入依赖的package包/类
public boolean execute(IRequestProcessor requestProcessor, IEventSender eventSender, ICvsListenerRegistry listenerRegistry, IClientEnvironment clientEnvironment, IProgressViewer progressViewer) throws CommandException,
                                                                                                                                                                                                                AuthenticationException {
	final ICvsFiles cvsFiles;
	try {
		cvsFiles = scanFileSystem(clientEnvironment);
	}
	catch (IOException ex) {
		throw new IOCommandException(ex);
	}

	final Requests requests = new Requests(CommandRequest.EDITORS, clientEnvironment);
	addFileRequests(cvsFiles, requests, clientEnvironment);
	requests.addLocalPathDirectoryRequest();
	addArgumentRequests(requests);

	final ICvsListener builder = new EditorsMessageParser(eventSender, clientEnvironment.getCvsFileSystem(), cvsFiles);
	builder.registerListeners(listenerRegistry);
	try {
		return requestProcessor.processRequests(requests, FileStateRequestsProgressHandler.create(progressViewer, cvsFiles));
	}
	finally {
		builder.unregisterListeners(listenerRegistry);
	}
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:EditorsCommand.java

示例9: execute

import org.netbeans.lib.cvsclient.connection.AuthenticationException; //导入依赖的package包/类
public boolean execute(IRequestProcessor requestProcessor, IEventSender eventManager, ICvsListenerRegistry listenerRegistry, IClientEnvironment clientEnvironment, IProgressViewer progressViewer) throws CommandException,
                                                                                                                                                                                                                 AuthenticationException {
	final ICvsFiles cvsFiles;
	try {
		cvsFiles = scanFileSystem(clientEnvironment);
	}
	catch (IOException ex) {
		throw new IOCommandException(ex);
	}

	final Requests requests = new Requests(CommandRequest.NOOP, clientEnvironment);
	addFileRequests(cvsFiles, requests, clientEnvironment);
	requests.addLocalPathDirectoryRequest();

	return requestProcessor.processRequests(requests, FileStateRequestsProgressHandler.create(progressViewer, cvsFiles));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:UneditCommand.java

示例10: execute

import org.netbeans.lib.cvsclient.connection.AuthenticationException; //导入依赖的package包/类
/**
 * Executes this command.
 *
 * @param requestProcessor the client services object that provides any necessary
 *               services to this command, including the ability to actually
 *               process all the requests
 */
public boolean execute(IRequestProcessor requestProcessor, IEventSender eventManager, ICvsListenerRegistry listenerRegistry, IClientEnvironment clientEnvironment, IProgressViewer progressViewer) throws CommandException,
                                                                                                                                                                                                                 AuthenticationException {
	final ICvsFiles cvsFiles;
	try {
		cvsFiles = scanFileSystem(clientEnvironment);
	}
	catch (IOException ex) {
		throw new IOCommandException(ex);
	}

	final Requests requests = new Requests(CommandRequest.WATCHERS, clientEnvironment);
	addFileRequests(cvsFiles, requests, clientEnvironment);
	requests.addLocalPathDirectoryRequest();
	addArgumentRequests(requests);

	return requestProcessor.processRequests(requests, FileStateRequestsProgressHandler.create(progressViewer, cvsFiles));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:WatchersCommand.java

示例11: checkout

import org.netbeans.lib.cvsclient.connection.AuthenticationException; //导入依赖的package包/类
private boolean checkout(ExpandedModules expandedModules, IRequestProcessor requestProcessor, ICvsListenerRegistry listenerRegistry, IClientEnvironment clientEnvironment)
         throws CommandException, AuthenticationException {
	// we first see whether the modules specified actually exist
	// checked out already. If so, we must work something like an update
	// command and send modified files to the server.
	processExistingModules(expandedModules, clientEnvironment);

	final Requests requests;
	requests = new Requests(CommandRequest.EXPORT, clientEnvironment);
	if (getAlternativeCheckoutDirectory() != null) {
		requests.addArgumentRequest("-d");
		requests.addArgumentRequest(getAlternativeCheckoutDirectory());
	}
	requests.addArgumentRequest(!isRecursive(), "-l");
	requests.addArgumentRequest(getUpdateByDate(), "-D");
	requests.addArgumentRequest(getUpdateByRevisionOrTag(), "-r");
	requests.addArgumentRequest(getKeywordSubstitution(), "-k");
	addModuleArguments(requests);
	requests.addLocalPathDirectoryRequest();

	try {
		return requestProcessor.processRequests(requests, new DummyRequestsProgressHandler());
	}
	finally {
	}
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:ExportCommand.java

示例12: execute

import org.netbeans.lib.cvsclient.connection.AuthenticationException; //导入依赖的package包/类
@Override
public boolean execute(IRequestProcessor requestProcessor, IEventSender eventManager,
                       ICvsListenerRegistry listenerRegistry,
                       IClientEnvironment clientEnvironment,
                       IProgressViewer progressViewer) throws CommandException, AuthenticationException {
  modules.clear();

  final Requests requests = new Requests(CommandRequest.CHECKOUT, clientEnvironment);
  requests.addArgumentRequest("-N");
  requests.addArgumentRequest("-c");
  requests.addDirectoryRequest(DirectoryObject.createInstance("/"));

  final ICvsListener listener = new GetModulesParser();
  listener.registerListeners(listenerRegistry);
  try {
    return requestProcessor.processRequests(requests, new DummyRequestsProgressHandler());
  }
  finally {
    listener.unregisterListeners(listenerRegistry);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:ListModulesCommand.java

示例13: expandModules

import org.netbeans.lib.cvsclient.connection.AuthenticationException; //导入依赖的package包/类
private boolean expandModules(ExpandedModules expandedModules,
                              ICvsListenerRegistry listenerRegistry,
                              IRequestProcessor requestProcessor,
                              IClientEnvironment clientEnvironment) throws CommandException, AuthenticationException {
  final Requests requests = new Requests(new ExpandModulesRequest(), clientEnvironment);

  addModuleArguments(requests);
  requests.addLocalPathDirectoryRequest();

  expandedModules.registerListeners(listenerRegistry);
  try {
    return requestProcessor.processRequests(requests, new DummyRequestsProgressHandler());
  }
  finally {
    expandedModules.unregisterListeners(listenerRegistry);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:CheckoutCommand.java

示例14: execute

import org.netbeans.lib.cvsclient.connection.AuthenticationException; //导入依赖的package包/类
protected synchronized void execute(GeneralCommandLine commandLine) throws AuthenticationException {
  try {
    commandLine.setPassParentEnvironment(true);
    myProcess = commandLine.createProcess();

    myErrThread = new ReadProcessThread(
      new BufferedReader(new InputStreamReader(myProcess.getErrorStream(), EncodingManager.getInstance().getDefaultCharset()))) {
      protected void textAvailable(String s) {
        myErrorText.append(s);
        myErrorRegistry.registerError(s);
        myContainsError = true;
      }
    };
    final Application application = ApplicationManager.getApplication();
    myStdErrFuture = application.executeOnPooledThread(myErrThread);

    myInputStream = myProcess.getInputStream();
    myOutputStream = myProcess.getOutputStream();

    waitForProcess(application);
  }
  catch (Exception e) {
    closeInternal();
    throw new AuthenticationException(e.getLocalizedMessage(), e);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:27,代码来源:ConnectionOnProcess.java

示例15: processCommand

import org.netbeans.lib.cvsclient.connection.AuthenticationException; //导入依赖的package包/类
/**
 * Process the CVS command passed in args[] array with all necessary
 * options. The only difference from main() method is, that this method
 * does not exit the JVM and provides command output.
 *
 * @param args The command with options
 * @throws AuthenticationException 
 * @throws CommandException 
 */
public boolean processCommand(String command, GlobalOptions globalOptions, String[] args, File workingDir, CVSListener listener)
  throws AuthenticationException, CommandException {

  // if we don't have a CVS root by now, the user has messed up
  if (globalOptions.getCVSRoot() == null) {
    throw new IllegalStateException("No CVS root is set. Please set " + CvsConfiguration.CVS_ROOT_PROP_KEY + ".");
  }

  final String cvsRoot = globalOptions.getCVSRoot();
  CVSRoot root = parseCvsRoot(cvsRoot);

  org.netbeans.lib.cvsclient.command.Command c = CommandFactory.getDefault().createCommand(command, args, 0, globalOptions, workingDir.getAbsolutePath());

  String username = getUsername(root);
  String password = getPassword(cvsRoot, root);
  try {
    connect(workingDir, root, username, password);
    client.getEventManager().addCVSListener(listener);
    LOG.debug("Executing CVS command: " + c.getCVSCommand());
    return client.executeCommand(c, globalOptions);
  } finally {
    disconnect();
  }
}
 
开发者ID:SonarSource,项目名称:sonar-scm-cvs,代码行数:34,代码来源:CvsCommandExecutor.java


注:本文中的org.netbeans.lib.cvsclient.connection.AuthenticationException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。