All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.asteriskjava.manager.internal.ProtocolIdentifierWrapper Maven / Gradle / Ivy

There is a newer version: 3.40.1
Show newest version
package org.asteriskjava.manager.internal;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;

class ProtocolIdentifierWrapper
{
    private CountDownLatch latch = new CountDownLatch(1);
    private String value;

    void reset()
    {
        value = null;
        latch = new CountDownLatch(1);
    }

    void await(long timeout) throws InterruptedException
    {
        latch.await(timeout, TimeUnit.MILLISECONDS);
    }

    String getValue()
    {
        return value;
    }

    void countDown()
    {
        latch.countDown();
    }

    public void setValue(String identifier)
    {
        value = identifier;

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy