[Asterisk-java-cvs] CVS: asterisk-java/src/java/net/sf/asterisk/manager/event AgentsEvent.java,NONE,
Brought to you by:
srt
From: Stefan R. <sr...@us...> - 2005-07-15 19:01:41
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3811/src/java/net/sf/asterisk/manager/event Added Files: AgentsEvent.java AgentsCompleteEvent.java Log Message: Added AgentsEvent and AgentsCompleteEvent after patch for Asterisk has been included in CVS-HEAD --- NEW FILE: AgentsEvent.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 AgentsEvent is triggered for each agent in response to an AgentsAction.<br> * Available since Asterisk 1.2 * * @see net.sf.asterisk.manager.action.AgentsAction * @author srt * @version $Id: AgentsEvent.java,v 1.1 2005/07/15 19:01:33 srt Exp $ * @since 0.2 */ public class AgentsEvent extends ResponseEvent { /** * Serial version identifier */ private static final long serialVersionUID = -3619197512835308812L; private String agent; private String name; private String status; private String loggedInChan; private Long loggedInTime; private String talkingTo; /** * @param source */ public AgentsEvent(Object source) { super(source); } /** * Returns the agentid. */ public String getAgent() { return agent; } /** * Sets the agentid. */ public void setAgent(String agent) { this.agent = agent; } /** * Returns the name of this agent. * * @return the name of this agent */ public String getName() { return name; } /** * Sets the name of this agent. * * @param name the name of this agent */ public void setName(String name) { this.name = name; } /** * Returns the status of this agent.<br> * This is one of * <dl> * <dt>"AGENT_LOGGEDOFF"</dt> * <dd>Agent isn't logged in</dd> * <dt>"AGENT_IDLE"</dt> * <dd>Agent is logged in, and waiting for call</dd> * <dt>"AGENT_ONCALL"</dt> * <dd>Agent is logged in, and on a call</dd> * <dt>"AGENT_UNKNOWN"</dt> * <dd>Don't know anything about agent. Shouldn't ever get this.</dd> * </dl> * * @return the status of this agent */ public String getStatus() { return status; } /** * Sets the status of this agent. * * @param status the status of this agent */ public void setStatus(String status) { this.status = status; } /** * Returns the name of channel this agent logged in from. * * @return the name of the channel this agent logged in from or "n/a" if the * agent is not logged in. */ public String getLoggedInChan() { return loggedInChan; } /** * Sets the name of channel this agent logged in from. * * @param loggedInChan the name of channel this agent logged in from */ public void setLoggedInChan(String loggedInChan) { this.loggedInChan = loggedInChan; } /** * Returns the time (in seconds since 01/01/1970) when the agent logged in. * * @return the time when the agent logged in or 0 if the user is not logged * in. */ public Long getLoggedInTime() { return loggedInTime; } /** * Sets the time when the agent logged in. * * @param loggedInTime the time when the agent logged in */ public void setLoggedInTime(Long loggedInTime) { this.loggedInTime = loggedInTime; } /** * Returns the numerical Caller*ID of the channel this agent is talking to. * * @return the numerical Caller*ID of the channel this agent is talking to * or "n/a" if this agent is talking to nobody. */ public String getTalkingTo() { return talkingTo; } /** * Sets the numerical Caller*ID of the channel this agent is talking to. * * @param talkingTo the numerical Caller*ID of the channel this agent is * talking to */ public void setTalkingTo(String talkingTo) { this.talkingTo = talkingTo; } } --- NEW FILE: AgentsCompleteEvent.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 AgentsCompleteEvent is triggered after the state of all agents has been * reported in response to an AgentsAction.<br> * Available since Asterisk 1.2 * * @see net.sf.asterisk.manager.action.AgentsAction * @author srt * @version $Id: AgentsCompleteEvent.java,v 1.1 2005/07/15 19:01:33 srt Exp $ * @since 0.2 */ public class AgentsCompleteEvent extends ResponseEvent { /** * Serial version identifier */ private static final long serialVersionUID = -1177773673509373296L; /** * @param source */ public AgentsCompleteEvent(Object source) { super(source); } } |