Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29213/src/java/net/sf/asterisk/manager/action
Modified Files:
AgentLogoffAction.java
Log Message:
Added soft attribute
Index: AgentLogoffAction.java
===================================================================
RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/AgentLogoffAction.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -p -r1.2 -r1.3
--- AgentLogoffAction.java 7 Aug 2005 00:09:42 -0000 1.2
+++ AgentLogoffAction.java 26 Aug 2005 21:56:14 -0000 1.3
@@ -31,6 +31,7 @@ public class AgentLogoffAction extends A
*/
private static final long serialVersionUID = 5239805071977668779L;
private String agent;
+ private Boolean soft;
/**
* Creates a new empty AgentLogoffAction.
@@ -52,6 +53,20 @@ public class AgentLogoffAction extends A
}
/**
+ * Creates a new AgentLogoffAction that logs off the given agent
+ *
+ * @param agent the name of the agent to log off.
+ * @param soft Boolean.TRUE if exisiting calls should not be hung up on
+ * logout.
+ * @since 0.2
+ */
+ public AgentLogoffAction(String agent, Boolean soft)
+ {
+ this(agent);
+ this.soft = soft;
+ }
+
+ /**
* Returns the name of this action, i.e. "AgentLogoff".
*
* @return the name of this action
@@ -81,4 +96,30 @@ public class AgentLogoffAction extends A
{
this.agent = agent;
}
+
+ /**
+ * Returns whether to hangup existing calls or not.<br>
+ * Default is to hangup existing calls on logoff.
+ *
+ * @return Boolean.TRUE if existing calls should not be hung up,
+ * Boolean.FALSE otherwise. <code>null</code> if default should be
+ * used.
+ */
+ public Boolean getSoft()
+ {
+ return soft;
+ }
+
+ /**
+ * Sets whether existing calls should be hung up or not.<br>
+ * Default is to hangup existing calls on logoff.
+ *
+ * @param soft Boolean.TRUE if existing calls should not be hung up,
+ * Boolean.FALSE otherwise. <code>null</code> if default should
+ * be used.
+ */
+ public void setSoft(Boolean soft)
+ {
+ this.soft = soft;
+ }
}
|