## org.apache.felix.httplite.server
Class ThreadGate

    java.lang.Object
      org.apache.felix.httplite.server.ThreadGate

    public class ThreadGate

extends java.lang.Object

This class implements a simple one-shot gate for threads. The gate starts closed and will block any threads that try to wait on it. Once opened, all waiting threads will be released. The gate cannot be reused.

Constructor Summary
`ThreadGate()`

Method Summary
`void` `await()` Wait for the gate to open.
`void` `open()` Open the gate and release any waiting threads.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ThreadGate

    public ThreadGate()

Method Detail

### open

    public void open()

  Open the gate and release any waiting threads.

### await

    public void await()
               throws java.lang.InterruptedException

  Wait for the gate to open.

  Throws:
    `java.lang.InterruptedException` - If the calling thread is interrupted; the gate still remains closed until opened.

Copyright © 2006-2012 The Apache Software Foundation. All Rights Reserved.