de.unkrig.commons.lang.protocol
Class StoppableUtil

java.lang.Object
  extended by de.unkrig.commons.lang.protocol.StoppableUtil

public final class StoppableUtil
extends java.lang.Object

Various Stoppable-related utility methods.


Method Summary
static Stoppable toStoppable(java.io.Closeable closeable)
          Creates a Stoppable that closes the given Closeable when Stoppable.stop() is called.
static Stoppable toStoppable(java.net.Socket socket)
          Amazingly, a Socket is not a Closeable, hence we need this special version of "toStoppable()".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toStoppable

public static Stoppable toStoppable(java.io.Closeable closeable)
Creates a Stoppable that closes the given Closeable when Stoppable.stop() is called.


toStoppable

public static Stoppable toStoppable(java.net.Socket socket)
Amazingly, a Socket is not a Closeable, hence we need this special version of "toStoppable()".

See Also:
toStoppable(Closeable)