RSE
Release 3.3

org.eclipse.rse.services
Class RemoteUtil

java.lang.Object
  extended by org.eclipse.rse.services.RemoteUtil

public class RemoteUtil
extends Object

Static helper-methods for network access.


Constructor Summary
RemoteUtil()
           
 
Method Summary
static void checkCanceled(IProgressMonitor monitor)
          Progress Monitor Helper: Checks the passed progress monitor and throws an OperationCanceledException when it is cancelled.
static Socket createSocket(String host, int port, int timeout, IProgressMonitor monitor)
          Helper method that will time out when making a socket connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteUtil

public RemoteUtil()
Method Detail

checkCanceled

public static void checkCanceled(IProgressMonitor monitor)
Progress Monitor Helper: Checks the passed progress monitor and throws an OperationCanceledException when it is cancelled.

Parameters:
monitor - The ProgressMonitor to be checked

createSocket

public static Socket createSocket(String host,
                                  int port,
                                  int timeout,
                                  IProgressMonitor monitor)
                           throws UnknownHostException,
                                  IOException
Helper method that will time out when making a socket connection. This is required because there is no way to provide a timeout value when creating a socket and in some instances, they don't seem to timeout at all.

Parameters:
host - inetaddress to connect to
port - port to connect to
timeout - number of seconds for timeout (default=60)
monitor - progress monitor
Throws:
UnknownHostException
IOException

RSE
Release 3.3

Copyright (c) IBM Corporation and others 2000, 2011. All Rights Reserved.