[Asterisk-java-cvs] CVS: asterisk-java/src/java/net/sf/asterisk/manager/event AgentCompleteEvent.jav
Brought to you by:
srt
From: Stefan R. <sr...@us...> - 2005-08-27 21:39:31
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25869/src/java/net/sf/asterisk/manager/event Added Files: AgentCompleteEvent.java AbstractMemberEvent.java AgentDumpEvent.java AgentConnectEvent.java Log Message: Added new events for app_queue: AgentDump, AgentConnect, AgentComplete (AJ-7) --- NEW FILE: AgentCompleteEvent.java --- /* * Copyright 2004-2005 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 net.sf.asterisk.manager.event; /** * An AgentCompleteEvent is triggered when at the end of a call if the caller * was connected to an agent.<br> * It is implemented in <code>apps/app_queue.c</code>.<br> * Available since Asterisk 1.2 * * @author srt * @version $Id: AgentCompleteEvent.java,v 1.1 2005/08/27 21:39:23 srt Exp $ * @since 0.2 */ public class AgentCompleteEvent extends AbstractMemberEvent { /** * Serial version identifier. */ private static final long serialVersionUID = 2108033737226142194L; private Long holdTime; private Long talkTime; private String reason; public AgentCompleteEvent(Object source) { super(source); } /** * Returns the amount of time the caller was on hold. * * @return the amount of time the caller was on hold in seconds. */ public Long getHoldTime() { return holdTime; } /** * Sets the amount of time the caller was on hold. * * @param holdtime the amount of time the caller was on hold in seconds. */ public void setHoldTime(Long holdtime) { this.holdTime = holdtime; } /** * Returns the amount of time the caller talked to the agent. * * @return the amount of time the caller talked to the agent in seconds. */ public Long getTalkTime() { return talkTime; } /** * Sets the amount of time the caller talked to the agent. * * @param talkTime the amount of time the caller talked to the agent in * seconds. */ public void setTalkTime(Long talkTime) { this.talkTime = talkTime; } /** * Returns if the agent or the caller terminated the call. * * @return "agent" if the agent terminated the call, "caller" if the caller * terminated the call. */ public String getReason() { return reason; } /** * Sets if the agent or the caller terminated the call. * * @param reason "agent" if the agent terminated the call, "caller" if the * caller terminated the call. */ public void setReason(String reason) { this.reason = reason; } } --- NEW FILE: AbstractMemberEvent.java --- /* * Copyright 2004-2005 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 net.sf.asterisk.manager.event; /** * Abstract base class for several queue member related events. * * @author srt * @version $Id: AbstractMemberEvent.java,v 1.1 2005/08/27 21:39:23 srt Exp $ * @since 0.2 */ public abstract class AbstractMemberEvent extends ManagerEvent { /** * Serializable version identifier */ private static final long serialVersionUID = -7437833328723536814L; private String channel; private String uniqueId; private String queue; private String member; /** * @param source */ public AbstractMemberEvent(Object source) { super(source); } /** * Returns the name of the channel. */ public String getChannel() { return channel; } /** * Sets the name of the channel. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the unique id of the channel. * * @return the unique id of the channel. */ public String getUniqueId() { return uniqueId; } /** * Sets the unique id of the channel. * * @param uniqueId the unique id of the channel. */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } /** * Returns the name of the queue. * * @return the name of the queue. */ public String getQueue() { return queue; } /** * Sets the name of the queue. * * @param queue the name of the queue. */ public void setQueue(String queue) { this.queue = queue; } /** * Returns the name of the member's interface. * * @return the name of the member's interface. */ public String getMember() { return member; } /** * Sets the name of the member's interface. * * @param member the name of the member's interface. */ public void setMember(String member) { this.member = member; } } --- NEW FILE: AgentDumpEvent.java --- /* * Copyright 2004-2005 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 net.sf.asterisk.manager.event; /** * An AgentDumpEvent is triggered when an agent dumps the caller while listening * to the queue announcement.<br> * It is implemented in <code>apps/app_queue.c</code>.<br> * Available since Asterisk 1.2 * * @author srt * @version $Id: AgentDumpEvent.java,v 1.1 2005/08/27 21:39:23 srt Exp $ * @since 0.2 */ public class AgentDumpEvent extends AbstractMemberEvent { /** * Serial version identifier. */ private static final long serialVersionUID = 2108033737226142194L; public AgentDumpEvent(Object source) { super(source); } } --- NEW FILE: AgentConnectEvent.java --- /* * Copyright 2004-2005 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 net.sf.asterisk.manager.event; /** * An AgentConnectEvent is triggered when a caller is connected to an agent.<br> * It is implemented in <code>apps/app_queue.c</code>.<br> * Available since Asterisk 1.2 * * @author srt * @version $Id: AgentConnectEvent.java,v 1.1 2005/08/27 21:39:23 srt Exp $ * @since 0.2 */ public class AgentConnectEvent extends AbstractMemberEvent { /** * Serial version identifier. */ private static final long serialVersionUID = 2108033737226142194L; private Long holdTime; public AgentConnectEvent(Object source) { super(source); } /** * Returns the amount of time the caller was on hold. * * @return the amount of time the caller was on hold in seconds. */ public Long getHoldTime() { return holdTime; } /** * Sets the amount of time the caller was on hold. * * @param holdtime the amount of time the caller was on hold in seconds. */ public void setHoldTime(Long holdtime) { this.holdTime = holdtime; } } |