本文整理匯總了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;
}
示例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;
}
}
示例3: AVDConnectionProviderService
import org.eclipse.remote.core.IRemoteConnectionType; //導入依賴的package包/類
public AVDConnectionProviderService(IRemoteConnectionType type) {
this.type = type;
}
示例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);
}
示例5: getConnectionType
import org.eclipse.remote.core.IRemoteConnectionType; //導入依賴的package包/類
@Override
public IRemoteConnectionType getConnectionType() {
return type;
}
示例6: AVDRemoteUIService
import org.eclipse.remote.core.IRemoteConnectionType; //導入依賴的package包/類
private AVDRemoteUIService(IRemoteConnectionType type) {
this.type = type;
}