Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DSDP - Target Management » RSE:How to set timeout to stop the connecting state?
RSE:How to set timeout to stop the connecting state? [message #581215] Tue, 23 June 2009 06:20
hemeihua is currently offline hemeihuaFriend
Messages: 20
Registered: July 2009
Junior Member
I creat a FTP connection with the specified port such as 8092 which has
been used by other applications,and connect the FTP connection,but can not
open a Socket connected to a remote host at the specified port(8092) by
indirectly call {@link$connect(String
hostname, int port)},and keep on connecting state for ever.

Here is my configuration:
- Windows XP PC running Eclipse 3.3.0 with plugin RSE (

Here are my code:
/*creat a FTP connection with the specified port such as 8092*/
public IHost creatFTPConnection(String siteName, String ip, int port ){
IHost ftpSite = null;
IRSESystemType systemType =
RSECorePlugin.getTheCoreRegistry().getSystemTypeById(RSE_SYS TEM_TYPE_ID);
ISubSystemConfigurator[] configurators = getSubSystemConfigurators();
String[] defaultProfileNames =
String aliasName = decorateAliasName(siteName);

if(defaultProfileNames.length > 0){
try {
ftpSite = sr.createHost(defaultProfileNames[0], systemType, aliasName,
"", "", 0,configurators);
} catch (Exception e) {
if(ftpSite != null){
ISubSystem[] subsystems = ftpSite.getSubSystems();
for (int i = 0; i < subsystems.length; i++){
ISubSystem subsystem = subsystems[i];
return ftpSite;

/*to connect the FTP connection with the specified port such as 8092*/
public class ConnectAllJob extends Job
private IHost fFtpSite, fTabDate;
private Viewer fViewer;
public ConnectAllJob(IHost site,IHost data, Viewer v )
fFtpSite = site;
fTabDate = data;
fViewer = v;

public IStatus run(IProgressMonitor monitor)
List failedSystems = new ArrayList();
//forced instantiation of all subsystems
ISubSystem[] subsystems = fTabDate.getSubSystems();
for (int i = 0; i < subsystems.length; i++)
ISubSystem subsystem = subsystems[i];
IConnectorService system = subsystem.getConnectorService();
if (!subsystem.isConnected()
subsystem.getSubSystemConfiguration().supportsSubSystemConne ct()
&& !failedSystems.contains(system))
subsystem.connect(monitor, false);
catch (SystemMessageException e) {
//TODO should we collect all messages and just show one dialog with
a MultiStatus?
catch (Exception e) {
if ((e instanceof InterruptedException) || (e
instanceof OperationCanceledException)) {
// if the user was prompted for password and cancelled
// or if the connect was interrupted for some other
// we don't attempt to connect the other subsystems
e.getLocalizedMessage()!=null ? e.getLocalizedMessage() :

SystemMessageDialog.displayErrorMessage(getShell(), e.getMessage());
catch (Exception exc)
} // msg already shown
if (failedSystems.size() > 0)
return Status.CANCEL_STATUS;
How to set timeout to stop the connecting state or what is the best way to
handle this problem?
Somebody can help me?
Best Regards,
Previous Topic:RSE can't open files in some directory, which give the RSEG1067 error
Next Topic:RSE:What is the use of RemoteSystemsTempFiles in workspace?
Goto Forum:

Current Time: Tue Jul 27 19:41:37 GMT 2021

Powered by FUDForum. Page generated in 0.01335 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top