org.mule.util
Class TimedSocket

java.lang.Object
  extended by org.mule.util.TimedSocket

public final class TimedSocket
extends Object

This class implements a timeout feature on socket connections.


Method Summary
static Socket createSocket(String host, int port, int timeout)
          Creates a socket and waits until the given timeout is reached.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createSocket

public static Socket createSocket(String host,
                                  int port,
                                  int timeout)
                           throws IOException
Creates a socket and waits until the given timeout is reached.

Parameters:
host -
port -
timeout - in milliseconds
Returns:
Connected socket or null.
Throws:
InterruptedIOException
IOException


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.