org.asteriskjava.manager.event.AbstractChannelEvent 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!
/*
* Copyright 2004-2006 Stefan Reuter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.asteriskjava.manager.event;
/**
* Abstract base class providing common properties channel related events.
*
* @author srt
* @version $Id$
*/
public abstract class AbstractChannelEvent extends ManagerEvent {
/**
* Serializable version identifier.
*/
static final long serialVersionUID = 5906599407896179295L;
protected String accountCode;
/**
* The name of the channel.
*/
private String channel;
/**
* The unique id of the channel.
*/
protected String uniqueId;
protected AbstractChannelEvent(Object source) {
super(source);
}
/**
* Returns the name of the channel.
*
* @return the name of the channel.
*/
public final String getChannel() {
return channel;
}
public final void setChannel(String channel) {
this.channel = channel;
}
/**
* Returns the unique id of the channel.
*
* @return the unique id of the channel.
*/
public final String getUniqueId() {
return uniqueId;
}
public final void setUniqueId(String uniqueId) {
this.uniqueId = uniqueId;
}
/**
* Returns the Caller*ID of the channel if set or null
if none
* has been set.
*
* @return the Caller*ID
* @see #getCallerIdNum()
* @deprecated
*/
@Deprecated
public final String getCallerId() {
return getCallerIdNum();
}
/**
* Sets the Caller*ID of the channel.
*
* @param callerId the Caller*ID of the channel.
* @deprecated
*/
@Deprecated
public final void setCallerId(String callerId) {
setCallerIdNum(callerId);
}
/**
* Returns the Caller*ID number of the channel if set or null
* if none has been set.
*
* @return the Caller*ID number
* @since 0.3
*/
public final String getCallerIdNum() {
return callerIdNum;
}
public final void setCallerIdNum(String callerIdNum) {
this.callerIdNum = callerIdNum;
}
/**
* Returns the Caller*ID Name of the channel if set or null
if
* none has been set.
*
* @return the Caller*ID Name of the channel.
*/
public final String getCallerIdName() {
return callerIdName;
}
public final void setCallerIdName(String callerIdName) {
this.callerIdName = callerIdName;
}
public String getAccountCode() {
return accountCode;
}
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
}