⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 socketreader.html

📁 开源软件openfire的API文件。进行openfire的二次开发所必需的工具。
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<P><DL></DL></DL><HR><A NAME="serverName"><!-- --></A><H3>serverName</H3><PRE>protected <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> <B>serverName</B></PRE><DL><DD>Server name for which we are attending clients.<P><DL></DL></DL><HR><A NAME="open"><!-- --></A><H3>open</H3><PRE>protected boolean <B>open</B></PRE><DL><DL></DL></DL><!-- ========= 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="SocketReader(org.jivesoftware.openfire.PacketRouter, org.jivesoftware.openfire.RoutingTable, java.lang.String, java.net.Socket, org.jivesoftware.openfire.net.SocketConnection, boolean)"><!-- --></A><H3>SocketReader</H3><PRE>public <B>SocketReader</B>(<A HREF="../../../../org/jivesoftware/openfire/PacketRouter.html" title="interface in org.jivesoftware.openfire">PacketRouter</A>&nbsp;router,                    <A HREF="../../../../org/jivesoftware/openfire/RoutingTable.html" title="interface in org.jivesoftware.openfire">RoutingTable</A>&nbsp;routingTable,                    <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>&nbsp;serverName,                    <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html" title="class or interface in java.net">Socket</A>&nbsp;socket,                    <A HREF="../../../../org/jivesoftware/openfire/net/SocketConnection.html" title="class in org.jivesoftware.openfire.net">SocketConnection</A>&nbsp;connection,                    boolean&nbsp;useBlockingMode)</PRE><DL><DD>Creates a dedicated reader for a socket.<P><DL><DT><B>Parameters:</B><DD><CODE>router</CODE> - the router for sending packets that were read.<DD><CODE>routingTable</CODE> - the table that keeps routes to registered services.<DD><CODE>serverName</CODE> - the name of the server this socket is working for.<DD><CODE>socket</CODE> - the socket to read from.<DD><CODE>connection</CODE> - the connection being read.<DD><CODE>useBlockingMode</CODE> - true means that the server will use a thread per connection.</DL></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="run()"><!-- --></A><H3>run</H3><PRE>public void <B>run</B>()</PRE><DL><DD>A dedicated thread loop for reading the stream and sending incoming packets to the appropriate router.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runnable.html#run()" title="class or interface in java.lang">run</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runnable.html" title="class or interface in java.lang">Runnable</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="process(org.dom4j.Element)"><!-- --></A><H3>process</H3><PRE>protected void <B>process</B>(org.dom4j.Element&nbsp;doc)                throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></PRE><DL><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></CODE></DL></DD></DL><HR><A NAME="processIQ(org.xmpp.packet.IQ)"><!-- --></A><H3>processIQ</H3><PRE>protected void <B>processIQ</B>(<A HREF="../../../../org/xmpp/packet/IQ.html" title="class in org.xmpp.packet">IQ</A>&nbsp;packet)                  throws <A HREF="../../../../org/jivesoftware/openfire/auth/UnauthorizedException.html" title="class in org.jivesoftware.openfire.auth">UnauthorizedException</A></PRE><DL><DD>Process the received IQ packet. Registered <A HREF="../../../../org/jivesoftware/openfire/interceptor/PacketInterceptor.html" title="interface in org.jivesoftware.openfire.interceptor"><CODE>PacketInterceptor</CODE></A> will be invoked before and after the packet was routed.<p> Subclasses may redefine this method for different reasons such as modifying the sender of the packet to avoid spoofing, rejecting the packet or even process the packet in another thread.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>packet</CODE> - the received packet.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/auth/UnauthorizedException.html" title="class in org.jivesoftware.openfire.auth">UnauthorizedException</A></CODE> - if the connection required security but was not secured.</DL></DD></DL><HR><A NAME="processPresence(org.xmpp.packet.Presence)"><!-- --></A><H3>processPresence</H3><PRE>protected void <B>processPresence</B>(<A HREF="../../../../org/xmpp/packet/Presence.html" title="class in org.xmpp.packet">Presence</A>&nbsp;packet)                        throws <A HREF="../../../../org/jivesoftware/openfire/auth/UnauthorizedException.html" title="class in org.jivesoftware.openfire.auth">UnauthorizedException</A></PRE><DL><DD>Process the received Presence packet. Registered <A HREF="../../../../org/jivesoftware/openfire/interceptor/PacketInterceptor.html" title="interface in org.jivesoftware.openfire.interceptor"><CODE>PacketInterceptor</CODE></A> will be invoked before and after the packet was routed.<p> Subclasses may redefine this method for different reasons such as modifying the sender of the packet to avoid spoofing, rejecting the packet or even process the packet in another thread.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>packet</CODE> - the received packet.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/auth/UnauthorizedException.html" title="class in org.jivesoftware.openfire.auth">UnauthorizedException</A></CODE> - if the connection required security but was not secured.</DL></DD></DL><HR><A NAME="processMessage(org.xmpp.packet.Message)"><!-- --></A><H3>processMessage</H3><PRE>protected void <B>processMessage</B>(<A HREF="../../../../org/xmpp/packet/Message.html" title="class in org.xmpp.packet">Message</A>&nbsp;packet)                       throws <A HREF="../../../../org/jivesoftware/openfire/auth/UnauthorizedException.html" title="class in org.jivesoftware.openfire.auth">UnauthorizedException</A></PRE><DL><DD>Process the received Message packet. Registered <A HREF="../../../../org/jivesoftware/openfire/interceptor/PacketInterceptor.html" title="interface in org.jivesoftware.openfire.interceptor"><CODE>PacketInterceptor</CODE></A> will be invoked before and after the packet was routed.<p> Subclasses may redefine this method for different reasons such as modifying the sender of the packet to avoid spoofing, rejecting the packet or even process the packet in another thread.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>packet</CODE> - the received packet.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/auth/UnauthorizedException.html" title="class in org.jivesoftware.openfire.auth">UnauthorizedException</A></CODE> - if the connection required security but was not secured.</DL></DD></DL><HR><A NAME="createSession()"><!-- --></A><H3>createSession</H3><PRE>protected void <B>createSession</B>()                      throws <A HREF="../../../../org/jivesoftware/openfire/auth/UnauthorizedException.html" title="class in org.jivesoftware.openfire.auth">UnauthorizedException</A>,                             org.xmlpull.v1.XmlPullParserException,                             <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Uses the XPP to grab the opening stream tag and create an active session object. The session to create will depend on the sent namespace. In all cases, the method obtains the opening stream tag, checks for errors, and either creates a session or returns an error and kills the connection. If the connection remains open, the XPP will be set to be ready for the first packet. A call to next() should result in an START_TAG state with the first packet in the stream.<P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/auth/UnauthorizedException.html" title="class in org.jivesoftware.openfire.auth">UnauthorizedException</A></CODE> - if the connection required security but was not secured.<DD><CODE>org.xmlpull.v1.XmlPullParserException</CODE> - if there was an XML error while creating the session.<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an IO error occured while creating the session.</DL></DD></DL><HR><A NAME="shutdown()"><!-- --></A><H3>shutdown</H3><PRE>protected void <B>shutdown</B>()</PRE><DL><DD>Notification message indicating that the SocketReader is shutting down. The thread will stop reading and processing new requests. Subclasses may want to redefine this message for releasing any resource they might need.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getExtraNamespaces()"><!-- --></A><H3>getExtraNamespaces</H3><PRE>public <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> <B>getExtraNamespaces</B>()</PRE><DL><DD><DL></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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Openfire 3.6.0a Javadoc</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../org/jivesoftware/openfire/net/SocketPacketWriteHandler.html" title="class in org.jivesoftware.openfire.net"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../org/jivesoftware/openfire/net/SocketSendingTracker.html" title="class in org.jivesoftware.openfire.net"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html?org/jivesoftware/openfire/net/SocketReader.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="SocketReader.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><i>Copyright &copy; 2003-2008 Jive Software.</i></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -