org.asteriskjava.pbx.ChannelFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of asterisk-java Show documentation
Show all versions of asterisk-java Show documentation
The free Java library for Asterisk PBX integration.
The newest version!
package org.asteriskjava.pbx;
import java.util.concurrent.atomic.AtomicLong;
/**
* Currently this factories only purposes is to serve up globally unique channel
* id's which every new channel must be assigned.
*
* @author bsutton
*/
public class ChannelFactory {
private final static AtomicLong nextChannelId = new AtomicLong();
public static long getNextChannelId() {
return nextChannelId.incrementAndGet();
}
}