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

org.asteriskjava.pbx.asterisk.wrap.events.VarSetEvent Maven / Gradle / Ivy

There is a newer version: 3.41.0
Show newest version
package org.asteriskjava.pbx.asterisk.wrap.events;

import org.asteriskjava.pbx.Channel;
import org.asteriskjava.pbx.InvalidChannelName;
import org.asteriskjava.pbx.PBXFactory;
import org.asteriskjava.pbx.internal.core.AsteriskPBX;

public class VarSetEvent extends ManagerEvent implements ChannelEvent {
    private static final long serialVersionUID = 1L;

    /**
     * The name of the channel.
     */
    private final Channel _channel;

    private String _variableName;

    private String _variableValue;

    public VarSetEvent(final org.asteriskjava.manager.event.VarSetEvent event) throws InvalidChannelName {
        super(event);
        final AsteriskPBX pbx = (AsteriskPBX) PBXFactory.getActivePBX();
        this._channel = pbx.internalRegisterChannel(event.getChannel(), event.getUniqueId());
        this._variableName = event.getVariable();
        this._variableValue = event.getValue();
    }

    @Override
    public Channel getChannel() {
        return this._channel;
    }

    public String getVariableName() {
        return this._variableName;
    }

    public String getVariableValue() {
        return this._variableValue;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy