當前位置: 首頁>>代碼示例>>Java>>正文


Java IRemoteConnectionType類代碼示例

本文整理匯總了Java中org.eclipse.remote.core.IRemoteConnectionType的典型用法代碼示例。如果您正苦於以下問題:Java IRemoteConnectionType類的具體用法?Java IRemoteConnectionType怎麽用?Java IRemoteConnectionType使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


IRemoteConnectionType類屬於org.eclipse.remote.core包,在下文中一共展示了IRemoteConnectionType類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getService

import org.eclipse.remote.core.IRemoteConnectionType; //導入依賴的package包/類
@SuppressWarnings("unchecked")
@Override
public <T extends Service> T getService(IRemoteConnectionType connectionType, Class<T> service) {
	if (IRemoteUIConnectionService.class.equals(service)) {
		return (T) new AVDRemoteUIService(connectionType);
	}
	return null;
}
 
開發者ID:dschaefer,項目名稱:andmore2,代碼行數:9,代碼來源:AVDRemoteUIService.java

示例2: getTarget

import org.eclipse.remote.core.IRemoteConnectionType; //導入依賴的package包/類
public static IRemoteConnection getTarget(int teamNumber) {
// The ip address based on the team number
      //String hostName = "10."+(teamNumber/100)+"."+(teamNumber%100)+".2";
      //String connectionName = hostName; //"Team "+teamNumber;
String hostName = "roboRIO-" + teamNumber + "-FRC.local";
String connectionName = hostName;
  
  IRemoteServicesManager mgr = getService(IRemoteServicesManager.class);
  IRemoteConnectionType connType = mgr.getConnectionType("org.eclipse.remote.JSch");
  IRemoteConnection connection = connType.getConnection(connectionName);
  if(connection == null)
  {
    try {
      IRemoteConnectionWorkingCopy connWC = connType.newConnection(connectionName);
      connWC.setAttribute("JSCH_ADDRESS_ATTR", hostName);
      connWC.setAttribute("JSCH_USERNAME_ATTR", "lvuser");
      connWC.setAttribute("JSCH_PASSWORD_ATTR", "");
      connWC.setAttribute("JSCH_IS_PASSWORD_ATTR", "true");
      connWC.setAttribute("JSCH_USE_LOGIN_SHELL_ATTR", "false");
      return connWC.save();
    } catch (RemoteConnectionException e) {
      WPILibCPPPlugin.logError("Error creating remote connection", e);
      return null;
    }
  } else
  {
    return connection;
  }
}
 
開發者ID:wpilibsuite,項目名稱:EclipsePlugins,代碼行數:30,代碼來源:RemoteUtils.java

示例3: AVDConnectionProviderService

import org.eclipse.remote.core.IRemoteConnectionType; //導入依賴的package包/類
public AVDConnectionProviderService(IRemoteConnectionType type) {
	this.type = type;
}
 
開發者ID:dschaefer,項目名稱:andmore2,代碼行數:4,代碼來源:AVDConnectionProviderService.java

示例4: getService

import org.eclipse.remote.core.IRemoteConnectionType; //導入依賴的package包/類
@Override
@SuppressWarnings("unchecked")
public <T extends Service> T getService(IRemoteConnectionType connectionType, Class<T> service) {
	return (T) new AVDConnectionProviderService(connectionType);
}
 
開發者ID:dschaefer,項目名稱:andmore2,代碼行數:6,代碼來源:AVDConnectionProviderService.java

示例5: getConnectionType

import org.eclipse.remote.core.IRemoteConnectionType; //導入依賴的package包/類
@Override
public IRemoteConnectionType getConnectionType() {
	return type;
}
 
開發者ID:dschaefer,項目名稱:andmore2,代碼行數:5,代碼來源:AVDConnectionProviderService.java

示例6: AVDRemoteUIService

import org.eclipse.remote.core.IRemoteConnectionType; //導入依賴的package包/類
private AVDRemoteUIService(IRemoteConnectionType type) {
	this.type = type;
}
 
開發者ID:dschaefer,項目名稱:andmore2,代碼行數:4,代碼來源:AVDRemoteUIService.java


注:本文中的org.eclipse.remote.core.IRemoteConnectionType類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。