[Asterisk-java-cvs] CVS: asterisk-java/src/java/net/sf/asterisk/manager/event QueueMemberPausedEvent
Brought to you by:
srt
From: Stefan R. <sr...@us...> - 2005-08-28 09:45:27
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14230/src/java/net/sf/asterisk/manager/event Modified Files: AgentCompleteEvent.java AgentDumpEvent.java AgentConnectEvent.java Added Files: QueueMemberPausedEvent.java AbstractAgentEvent.java QueueMemberAddedEvent.java QueueMemberRemovedEvent.java AbstractQueueMemberEvent.java Log Message: Added new events for app_queue: QueueMemberRemoved, QueueMemberAdded, QueueMemberPaused (AJ-7) Updated events for AgentDump, AgentConnect, AgentComplete --- NEW FILE: QueueMemberPausedEvent.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; /** * A QueueMemberPausedEvent is triggered when a queue member is paused or * unpaused.<br> * It is implemented in <code>apps/app_queue.c</code>.<br> * Available since Asterisk 1.2 * * @author srt * @version $Id: QueueMemberPausedEvent.java,v 1.1 2005/08/28 09:45:18 srt Exp $ * @since 0.2 */ public class QueueMemberPausedEvent extends AbstractQueueMemberEvent { /** * Serial version identifier. */ private static final long serialVersionUID = 2108033737226142194L; private Boolean paused; public QueueMemberPausedEvent(Object source) { super(source); } /** * Returns if this queue member is paused (not accepting calls).<br> * * @return <code>Boolean.TRUE</code> if this member has been paused or * <code>Boolean.FALSE</code> if not. */ public Boolean getPaused() { return paused; } /** * Sets if this member is paused. * * @param paused <code>Boolean.TRUE</code> if this member has been paused * or <code>Boolean.FALSE</code> if not. */ public void setPaused(Boolean paused) { this.paused = paused; } } --- NEW FILE: AbstractAgentEvent.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 agent related events. * * @author srt * @version $Id: AbstractAgentEvent.java,v 1.1 2005/08/28 09:45:18 srt Exp $ * @since 0.2 */ public abstract class AbstractAgentEvent 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 AbstractAgentEvent(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: QueueMemberAddedEvent.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; /** * A QueueMemberAddedEvent is triggered when a queue member is added to a queue.<br> * It is implemented in <code>apps/app_queue.c</code>.<br> * Available since Asterisk 1.2 * * @author srt * @version $Id: QueueMemberAddedEvent.java,v 1.1 2005/08/28 09:45:19 srt Exp $ * @since 0.2 */ public class QueueMemberAddedEvent extends AbstractQueueMemberEvent { /** * Serial version identifier. */ private static final long serialVersionUID = 2108033737226142194L; private String membership; private Integer penalty; private Integer callsTaken; private Long lastCall; private Integer status; private Boolean paused; public QueueMemberAddedEvent(Object source) { super(source); } /** * Returns if the added member is a dynamic or static queue member. * * @return "dynamic" if the added member is a dynamic queue member, "static" * if the added member is a static queue member. */ public String getMembership() { return membership; } /** * Sets if the added member is a dynamic or static queue member. * * @param membership "dynamic" if the added member is a dynamic queue * member, "static" if the added member is a static queue member. */ public void setMembership(String membership) { this.membership = membership; } /** * Returns the penalty for the added member. When calls are distributed * members with higher penalties are considered last. * * @return the penalty for the added member. */ public Integer getPenalty() { return penalty; } /** * Sets the penalty for this member. * * @param penalty the penalty for this member. */ public void setPenalty(Integer penalty) { this.penalty = penalty; } /** * Returns the number of calls answered by the member. * * @return the number of calls answered by the member. */ public Integer getCallsTaken() { return callsTaken; } /** * Sets the number of calls answered by the added member. * * @param callsTaken the number of calls answered by the added member. */ public void setCallsTaken(Integer callsTaken) { this.callsTaken = callsTaken; } /** * Returns the time the last successful call answered by the added member * was hungup. * * @return the time (in seconds since 01/01/1970) the last successful call * answered by the added member was hungup. */ public Long getLastCall() { return lastCall; } /** * Sets the time the last successful call answered by this member was * hungup. * * @param lastCall the time (in seconds since 01/01/1970) the last * successful call answered by the added member was hungup. */ public void setLastCall(Long lastCall) { this.lastCall = lastCall; } /** * Returns the status of this queue member.<br> * Valid status codes are: * <dl> * <dt>AST_DEVICE_UNKNOWN (0)</dt> * <dd>Queue member is available</dd> * <dt>AST_DEVICE_NOT_INUSE (1)</dt> * <dd>?</dd> * <dt>AST_DEVICE_INUSE (2)</dt> * <dd>?</dd> * <dt>AST_DEVICE_BUSY (3)</dt> * <dd>?</dd> * <dt>AST_DEVICE_INVALID (4)</dt> * <dd>?</dd> * <dt>AST_DEVICE_UNAVAILABLE (5)</dt> * <dd>?</dd> * </dl> * * @return the status of this queue member. */ public Integer getStatus() { return status; } /** * Sets the status of this queue member. * * @param the status of this queue member */ public void setStatus(Integer status) { this.status = status; } /** * Returns if this queue member is paused (not accepting calls).<br> * * @return <code>Boolean.TRUE</code> if this member has been paused or * <code>Boolean.FALSE</code> if not. */ public Boolean getPaused() { return paused; } /** * Sets if this member is paused. * * @param paused <code>Boolean.TRUE</code> if this member has been paused * or <code>Boolean.FALSE</code> if not. */ public void setPaused(Boolean paused) { this.paused = paused; } } --- NEW FILE: QueueMemberRemovedEvent.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; /** * A QueueMemberRemovedEvent is triggered when a queue member is removed from a * queue.<br> * It is implemented in <code>apps/app_queue.c</code>.<br> * Available since Asterisk 1.2 * * @author srt * @version $Id: QueueMemberRemovedEvent.java,v 1.1 2005/08/28 09:45:19 srt Exp $ * @since 0.2 */ public class QueueMemberRemovedEvent extends AbstractQueueMemberEvent { /** * Serial version identifier. */ private static final long serialVersionUID = 2108033737226142194L; public QueueMemberRemovedEvent(Object source) { super(source); } } --- NEW FILE: AbstractQueueMemberEvent.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: AbstractQueueMemberEvent.java,v 1.1 2005/08/28 09:45:19 srt Exp $ * @since 0.2 */ public abstract class AbstractQueueMemberEvent extends ManagerEvent { /** * Serializable version identifier */ private static final long serialVersionUID = -7437833328723536814L; private String queue; private String location; /** * @param source */ public AbstractQueueMemberEvent(Object source) { super(source); } /** * 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.<br> * E.g. the channel name or agent group. * * @return the name of the member's interface. */ public String getLocation() { return location; } /** * Sets the name of the member's interface. * * @param member the name of the member's interface. */ public void setLocation(String member) { this.location = member; } } Index: AgentCompleteEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/AgentCompleteEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- AgentCompleteEvent.java 27 Aug 2005 21:39:23 -0000 1.1 +++ AgentCompleteEvent.java 28 Aug 2005 09:45:18 -0000 1.2 @@ -26,7 +26,7 @@ package net.sf.asterisk.manager.event; * @version $Id$ * @since 0.2 */ -public class AgentCompleteEvent extends AbstractMemberEvent +public class AgentCompleteEvent extends AbstractAgentEvent { /** * Serial version identifier. Index: AgentDumpEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/AgentDumpEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- AgentDumpEvent.java 27 Aug 2005 21:39:23 -0000 1.1 +++ AgentDumpEvent.java 28 Aug 2005 09:45:19 -0000 1.2 @@ -26,7 +26,7 @@ package net.sf.asterisk.manager.event; * @version $Id$ * @since 0.2 */ -public class AgentDumpEvent extends AbstractMemberEvent +public class AgentDumpEvent extends AbstractAgentEvent { /** * Serial version identifier. Index: AgentConnectEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/AgentConnectEvent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- AgentConnectEvent.java 27 Aug 2005 21:39:23 -0000 1.1 +++ AgentConnectEvent.java 28 Aug 2005 09:45:19 -0000 1.2 @@ -25,7 +25,7 @@ package net.sf.asterisk.manager.event; * @version $Id$ * @since 0.2 */ -public class AgentConnectEvent extends AbstractMemberEvent +public class AgentConnectEvent extends AbstractAgentEvent { /** * Serial version identifier. |