org.mule.util
Class TimedSocket

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

public final class TimedSocket
extends java.lang.Object

This class implements a timeout feature on socket connections.


Method Summary
static java.net.Socket createSocket(java.lang.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 java.net.Socket createSocket(java.lang.String host,
                                           int port,
                                           int timeout)
                                    throws java.io.IOException
Creates a socket and waits until the given timeout is reached.

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


Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.