📄 managerresponse.html
字号:
<DL><DD>Returns a Map with all attributes of this response.<p> The keys are all lower case!<P><DD><DL></DL></DD><DD><DL><DT><B>See Also:</B><DD><A HREF="../../../../org/asteriskjava/manager/response/ManagerResponse.html#getAttribute(java.lang.String)"><CODE>getAttribute(String)</CODE></A></DL></DD></DL><HR><A NAME="setAttributes(java.util.Map)"><!-- --></A><H3>setAttributes</H3><PRE>public void <B>setAttributes</B>(java.util.Map<java.lang.String,java.lang.String> attributes)</PRE><DL><DD>Sets the Map with all attributes.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>attributes</CODE> - Map with containing the attributes with all lower case keys.</DL></DD></DL><HR><A NAME="getAttribute(java.lang.String)"><!-- --></A><H3>getAttribute</H3><PRE>public java.lang.String <B>getAttribute</B>(java.lang.String key)</PRE><DL><DD>Returns the value of the attribute with the given key.<p> This is particulary important when a response contains special attributes that are dependent on the action that has been sent.<p> An example of this is the response to the GetVarAction. It contains the value of the channel variable as an attribute stored under the key of the variable name.<p> Example: <pre> GetVarAction action = new GetVarAction(); action.setChannel("SIP/1310-22c3"); action.setVariable("ALERT_INFO"); ManagerResponse response = connection.sendAction(action); String alertInfo = response.getAttribute("ALERT_INFO"); </pre> As all attributes are internally stored in lower case the key is automatically converted to lower case before lookup.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the key to lookup.<DT><B>Returns:</B><DD>the value of the attribute stored under this key or <code>null</code> if there is no such attribute.</DL></DD></DL><HR><A NAME="getDateReceived()"><!-- --></A><H3>getDateReceived</H3><PRE>public java.util.Date <B>getDateReceived</B>()</PRE><DL><DD>Returns the point in time this response was received from the asterisk server.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="setDateReceived(java.util.Date)"><!-- --></A><H3>setDateReceived</H3><PRE>public void <B>setDateReceived</B>(java.util.Date dateReceived)</PRE><DL><DD>Sets the point in time this response was received from the asterisk server.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getActionId()"><!-- --></A><H3>getActionId</H3><PRE>public java.lang.String <B>getActionId</B>()</PRE><DL><DD>Returns the user provided action id of the ManagerAction that caused this response. If the application did not set an action id this method returns <code>null</code>.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the action id of the ManagerAction that caused this response or <code>null</code> if none was set.<DT><B>See Also:</B><DD><CODE>org.asteriskjava.manager.action.ManagerAction#setActionId()</CODE></DL></DD></DL><HR><A NAME="setActionId(java.lang.String)"><!-- --></A><H3>setActionId</H3><PRE>public void <B>setActionId</B>(java.lang.String actionId)</PRE><DL><DD>Sets the action id of the ManagerAction that caused this response.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>actionId</CODE> - the action id of the ManagerAction that caused this response.</DL></DD></DL><HR><A NAME="getMessage()"><!-- --></A><H3>getMessage</H3><PRE>public java.lang.String <B>getMessage</B>()</PRE><DL><DD>Returns the message received with this response. The content depends on the action that generated this response.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="setMessage(java.lang.String)"><!-- --></A><H3>setMessage</H3><PRE>public void <B>setMessage</B>(java.lang.String message)</PRE><DL><DD>Sets the message.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getResponse()"><!-- --></A><H3>getResponse</H3><PRE>public java.lang.String <B>getResponse</B>()</PRE><DL><DD>Returns the value of the "Response:" line. This typically a String like "Success" or "Error" but depends on the action that generated this response.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="setResponse(java.lang.String)"><!-- --></A><H3>setResponse</H3><PRE>public void <B>setResponse</B>(java.lang.String response)</PRE><DL><DD>Sets the response.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getUniqueId()"><!-- --></A><H3>getUniqueId</H3><PRE>public java.lang.String <B>getUniqueId</B>()</PRE><DL><DD>Returns the unique id received with this response. The unique id is used to keep track of channels created by the action sent, for example an OriginateAction.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="setUniqueId(java.lang.String)"><!-- --></A><H3>setUniqueId</H3><PRE>public void <B>setUniqueId</B>(java.lang.String uniqueId)</PRE><DL><DD>Sets the unique id received with this response.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>()</PRE><DL><DD><DL><DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL></DD><DD><DL></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ManagerResponse.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>Asterisk-Java</EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../org/asteriskjava/manager/response/ManagerError.html" title="class in org.asteriskjava.manager.response"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?org/asteriskjava/manager/response/ManagerResponse.html" target="_top"><B>FRAMES</B></A> <A HREF="ManagerResponse.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR>Copyright © 2004-2007 Stefan Reuter. All Rights Reserved.</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -