org.asteriskjava.pbx.asterisk.wrap.actions.AbstractManagerAction 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.
package org.asteriskjava.pbx.asterisk.wrap.actions;
/**
* Automatically generates a globally unique action id (based on the systems mac
* address
*
* @author bsutton
*
*/
abstract public class AbstractManagerAction implements ManagerAction
{
private static long _nextActionId = 1;
private String _actionId;
AbstractManagerAction()
{
this._actionId = generateActionId();
}
public String getActionId()
{
return this._actionId;
}
synchronized public String generateActionId()
{
return "" + _nextActionId++;
}
protected void setActionId(String actionId)
{
this._actionId = actionId;
}
}