📄 queryhandler.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><TITLE>QueryHandler (Project JXTA J2SE)</TITLE><META NAME="keywords" CONTENT="net.jxta.resolver.QueryHandler interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="QueryHandler (Project JXTA J2SE)";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_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/QueryHandler.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><a href='http://www.jxta.org' target='_blank'>Project JXTA</a></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../net/jxta/resolver/GenericResolver.html" title="interface in net.jxta.resolver"><B>PREV CLASS</B></A> <A HREF="../../../net/jxta/resolver/ResolverService.html" title="interface in net.jxta.resolver"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="QueryHandler.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 | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">net.jxta.resolver</FONT><BR>Interface QueryHandler</H2><DL><DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../net/jxta/impl/resolver/InternalQueryHandler.html" title="interface in net.jxta.impl.resolver">InternalQueryHandler</A></DD></DL><DL><DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../net/jxta/impl/discovery/DiscoveryServiceImpl.html" title="class in net.jxta.impl.discovery">DiscoveryServiceImpl</A>, <A HREF="../../../net/jxta/impl/peer/PeerInfoServiceImpl.PipQueryHandler.html" title="class in net.jxta.impl.peer">PeerInfoServiceImpl.PipQueryHandler</A>, <A HREF="../../../net/jxta/impl/pipe/PipeResolver.html" title="class in net.jxta.impl.pipe">PipeResolver</A>, <A HREF="../../../net/jxta/impl/endpoint/router/RouteResolver.html" title="class in net.jxta.impl.endpoint.router">RouteResolver</A></DD></DL><HR><DL><DT>public interface <B>QueryHandler</B></DL><P>Services that wish to act as a resolver handler must implement this interface<P><P><DL><DT><B>See Also:</B><DD><A HREF="../../../net/jxta/resolver/ResolverService.html" title="interface in net.jxta.resolver"><CODE>ResolverService</CODE></A>, <A HREF="../../../net/jxta/resolver/GenericResolver.html" title="interface in net.jxta.resolver"><CODE>GenericResolver</CODE></A>, <A HREF="../../../net/jxta/protocol/ResolverQueryMsg.html" title="class in net.jxta.protocol"><CODE>ResolverQueryMsg</CODE></A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><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="../../../net/jxta/resolver/QueryHandler.html#processQuery(net.jxta.protocol.ResolverQueryMsg)">processQuery</A></B>(<A HREF="../../../net/jxta/protocol/ResolverQueryMsg.html" title="class in net.jxta.protocol">ResolverQueryMsg</A> query)</CODE><BR> Process the resolver query, and generate response it is the responsibilty of the handler to send the response <p/> result = processIncommingQuery(query); if (result !</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="../../../net/jxta/resolver/QueryHandler.html#processResponse(net.jxta.protocol.ResolverResponseMsg)">processResponse</A></B>(<A HREF="../../../net/jxta/protocol/ResolverResponseMsg.html" title="class in net.jxta.protocol">ResolverResponseMsg</A> response)</CODE><BR> Called when messages are received by the ResolverService it calls back this method to deal with received responses</TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="processQuery(net.jxta.protocol.ResolverQueryMsg)"><!-- --></A><H3>processQuery</H3><PRE>public int <B>processQuery</B>(<A HREF="../../../net/jxta/protocol/ResolverQueryMsg.html" title="class in net.jxta.protocol">ResolverQueryMsg</A> query)</PRE><DL><DD>Process the resolver query, and generate response it is the responsibilty of the handler to send the response <p/><pre> result = processIncommingQuery(query); if (result != null) { resolver.sendResponse(query.getSrc(), response); return ResolverService.OK; } else return ResolverService.Repropagate; </pre><P><DD><DL><DT><B>Parameters:</B><DD><CODE>query</CODE> - ResolverQueryMsg query<DT><B>Returns:</B><DD>int status, <A HREF="../../../net/jxta/resolver/ResolverService.html#OK"><CODE>OK</CODE></A> success, <A HREF="../../../net/jxta/resolver/ResolverService.html#Repropagate"><CODE>Repropagate</CODE></A> to indicate a re-propagation is needed</DL></DD></DL><HR><A NAME="processResponse(net.jxta.protocol.ResolverResponseMsg)"><!-- --></A><H3>processResponse</H3><PRE>public void <B>processResponse</B>(<A HREF="../../../net/jxta/protocol/ResolverResponseMsg.html" title="class in net.jxta.protocol">ResolverResponseMsg</A> response)</PRE><DL><DD>Called when messages are received by the ResolverService it calls back this method to deal with received responses<P><DD><DL><DT><B>Parameters:</B><DD><CODE>response</CODE> - ResolverQueryMsg reponse</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=3 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/QueryHandler.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>JXTA J2SE</EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../net/jxta/resolver/GenericResolver.html" title="interface in net.jxta.resolver"><B>PREV CLASS</B></A> <A HREF="../../../net/jxta/resolver/ResolverService.html" title="interface in net.jxta.resolver"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="QueryHandler.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 | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -