📄 offlinemessagestore.html
字号:
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/openfire/OfflineMessageStore.html#getSize(java.lang.String)">getSize</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> username)</CODE><BR> Returns the approximate size (in bytes) of the XML messages stored for a particular user.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/openfire/OfflineMessageStore.html#start()">start</A></B>()</CODE><BR> Starts the basic module.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/openfire/OfflineMessageStore.html#stop()">stop</A></B>()</CODE><BR> Stops the basic module.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/openfire/OfflineMessageStore.html#userCreated(org.jivesoftware.openfire.user.User, java.util.Map)">userCreated</A></B>(<A HREF="../../../org/jivesoftware/openfire/user/User.html" title="class in org.jivesoftware.openfire.user">User</A> user, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A> params)</CODE><BR> A user was created.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/openfire/OfflineMessageStore.html#userDeleting(org.jivesoftware.openfire.user.User, java.util.Map)">userDeleting</A></B>(<A HREF="../../../org/jivesoftware/openfire/user/User.html" title="class in org.jivesoftware.openfire.user">User</A> user, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A> params)</CODE><BR> A user is being deleted.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/openfire/OfflineMessageStore.html#userModified(org.jivesoftware.openfire.user.User, java.util.Map)">userModified</A></B>(<A HREF="../../../org/jivesoftware/openfire/user/User.html" title="class in org.jivesoftware.openfire.user">User</A> user, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A> params)</CODE><BR> A user's name, email, or an extended property was changed.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_org.jivesoftware.openfire.container.BasicModule"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class org.jivesoftware.openfire.container.<A HREF="../../../org/jivesoftware/openfire/container/BasicModule.html" title="class in org.jivesoftware.openfire.container">BasicModule</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../org/jivesoftware/openfire/container/BasicModule.html#destroy()">destroy</A>, <A HREF="../../../org/jivesoftware/openfire/container/BasicModule.html#getName()">getName</A>, <A HREF="../../../org/jivesoftware/openfire/container/BasicModule.html#initialize(org.jivesoftware.openfire.XMPPServer)">initialize</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE> <P><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="OfflineMessageStore()"><!-- --></A><H3>OfflineMessageStore</H3><PRE>public <B>OfflineMessageStore</B>()</PRE><DL><DD>Constructs a new offline message store.<P></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getInstance()"><!-- --></A><H3>getInstance</H3><PRE>public static <A HREF="../../../org/jivesoftware/openfire/OfflineMessageStore.html" title="class in org.jivesoftware.openfire">OfflineMessageStore</A> <B>getInstance</B>()</PRE><DL><DD>Returns the instance of <tt>OfflineMessageStore</tt> being used by the XMPPServer.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the instance of <tt>OfflineMessageStore</tt> being used by the XMPPServer.</DL></DD></DL><HR><A NAME="addMessage(org.xmpp.packet.Message)"><!-- --></A><H3>addMessage</H3><PRE>public void <B>addMessage</B>(<A HREF="../../../org/xmpp/packet/Message.html" title="class in org.xmpp.packet">Message</A> message)</PRE><DL><DD>Adds a message to this message store. Messages will be stored and made available for later delivery.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>message</CODE> - the message to store.</DL></DD></DL><HR><A NAME="getMessages(java.lang.String, boolean)"><!-- --></A><H3>getMessages</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A><<A HREF="../../../org/jivesoftware/openfire/OfflineMessage.html" title="class in org.jivesoftware.openfire">OfflineMessage</A>> <B>getMessages</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> username, boolean delete)</PRE><DL><DD>Returns a Collection of all messages in the store for a user. Messages may be deleted after being selected from the database depending on the delete param.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>username</CODE> - the username of the user who's messages you'd like to receive.<DD><CODE>delete</CODE> - true if the offline messages should be deleted.<DT><B>Returns:</B><DD>An iterator of packets containing all offline messages.</DL></DD></DL><HR><A NAME="getMessage(java.lang.String, java.util.Date)"><!-- --></A><H3>getMessage</H3><PRE>public <A HREF="../../../org/jivesoftware/openfire/OfflineMessage.html" title="class in org.jivesoftware.openfire">OfflineMessage</A> <B>getMessage</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> username, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> creationDate)</PRE><DL><DD>Returns the offline message of the specified user with the given creation date. The returned message will NOT be deleted from the database.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>username</CODE> - the username of the user who's message you'd like to receive.<DD><CODE>creationDate</CODE> - the date when the offline message was stored in the database.<DT><B>Returns:</B><DD>the offline message of the specified user with the given creation stamp.</DL></DD></DL><HR><A NAME="deleteMessages(java.lang.String)"><!-- --></A><H3>deleteMessages</H3><PRE>public void <B>deleteMessages</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> username)</PRE><DL><DD>Deletes all offline messages in the store for a user.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>username</CODE> - the username of the user who's messages are going to be deleted.</DL></DD></DL><HR><A NAME="deleteMessage(java.lang.String, java.util.Date)"><!-- --></A><H3>deleteMessage</H3><PRE>public void <B>deleteMessage</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> username, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> creationDate)</PRE><DL><DD>Deletes the specified offline message in the store for a user. The way to identify the message to delete is based on the creationDate and username.<P><DD><DL></DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -