?? module.html
字號(hào):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><TITLE>Module (Project JXTA J2SE)</TITLE><META NAME="keywords" CONTENT="net.jxta.platform.Module interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="Module (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/Module.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/platform/Application.html" title="interface in net.jxta.platform"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="Module.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 | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | 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.platform</FONT><BR>Interface Module</H2><DL><DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../net/jxta/access/AccessService.html" title="interface in net.jxta.access">AccessService</A>, <A HREF="../../../net/jxta/platform/Application.html" title="interface in net.jxta.platform">Application</A>, <A HREF="../../../net/jxta/discovery/DiscoveryService.html" title="interface in net.jxta.discovery">DiscoveryService</A>, <A HREF="../../../net/jxta/endpoint/EndpointService.html" title="interface in net.jxta.endpoint">EndpointService</A>, <A HREF="../../../net/jxta/membership/MembershipService.html" title="interface in net.jxta.membership">MembershipService</A>, <A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A>, <A HREF="../../../net/jxta/peer/PeerInfoService.html" title="interface in net.jxta.peer">PeerInfoService</A>, <A HREF="../../../net/jxta/pipe/PipeService.html" title="interface in net.jxta.pipe">PipeService</A>, <A HREF="../../../net/jxta/impl/peergroup/RefPeerGroup.html" title="interface in net.jxta.impl.peergroup">RefPeerGroup</A>, <A HREF="../../../net/jxta/rendezvous/RendezVousService.html" title="interface in net.jxta.rendezvous">RendezVousService</A>, <A HREF="../../../net/jxta/resolver/ResolverService.html" title="interface in net.jxta.resolver">ResolverService</A>, <A HREF="../../../net/jxta/service/Service.html" title="interface in net.jxta.service">Service</A>, <A HREF="../../../net/jxta/meter/ServiceMonitor.html" title="interface in net.jxta.meter">ServiceMonitor</A>, <A HREF="../../../net/jxta/impl/meter/ServiceMonitorImpl.html" title="interface in net.jxta.impl.meter">ServiceMonitorImpl</A>, <A HREF="../../../net/jxta/impl/meter/ServiceMonitorResource.html" title="interface in net.jxta.impl.meter">ServiceMonitorResource</A></DD></DL><DL><DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../net/jxta/impl/access/always/AlwaysAccessService.html" title="class in net.jxta.impl.access.always">AlwaysAccessService</A>, <A HREF="../../../net/jxta/impl/endpoint/cbjx/CbJxTransport.html" title="class in net.jxta.impl.endpoint.cbjx">CbJxTransport</A>, <A HREF="../../../net/jxta/impl/discovery/DiscoveryServiceImpl.html" title="class in net.jxta.impl.discovery">DiscoveryServiceImpl</A>, <A HREF="../../../net/jxta/impl/discovery/DiscoveryServiceInterface.html" title="class in net.jxta.impl.discovery">DiscoveryServiceInterface</A>, <A HREF="../../../net/jxta/impl/endpoint/router/EndpointRouter.html" title="class in net.jxta.impl.endpoint.router">EndpointRouter</A>, <A HREF="../../../net/jxta/impl/endpoint/EndpointServiceImpl.html" title="class in net.jxta.impl.endpoint">EndpointServiceImpl</A>, <A HREF="../../../net/jxta/impl/endpoint/EndpointServiceInterface.html" title="class in net.jxta.impl.endpoint">EndpointServiceInterface</A>, <A HREF="../../../net/jxta/impl/peergroup/GenericPeerGroup.html" title="class in net.jxta.impl.peergroup">GenericPeerGroup</A>, <A HREF="../../../net/jxta/impl/meter/GenericServiceMonitor.html" title="class in net.jxta.impl.meter">GenericServiceMonitor</A>, <A HREF="../../../net/jxta/peergroup/LightWeightPeerGroup.html" title="class in net.jxta.peergroup">LightWeightPeerGroup</A>, <A HREF="../../../net/jxta/impl/meter/MonitorManager.html" title="class in net.jxta.impl.meter">MonitorManager</A>, <A HREF="../../../net/jxta/impl/membership/NullMembershipService.html" title="class in net.jxta.impl.membership">NullMembershipService</A>, <A HREF="../../../net/jxta/impl/membership/PasswdMembershipService.html" title="class in net.jxta.impl.membership">PasswdMembershipService</A>, <A HREF="../../../net/jxta/impl/peergroup/PeerGroupInterface.html" title="class in net.jxta.impl.peergroup">PeerGroupInterface</A>, <A HREF="../../../net/jxta/impl/peer/PeerInfoServiceImpl.html" title="class in net.jxta.impl.peer">PeerInfoServiceImpl</A>, <A HREF="../../../net/jxta/impl/peer/PeerInfoServiceInterface.html" title="class in net.jxta.impl.peer">PeerInfoServiceInterface</A>, <A HREF="../../../net/jxta/impl/pipe/PipeServiceImpl.html" title="class in net.jxta.impl.pipe">PipeServiceImpl</A>, <A HREF="../../../net/jxta/impl/pipe/PipeServiceInterface.html" title="class in net.jxta.impl.pipe">PipeServiceInterface</A>, <A HREF="../../../net/jxta/impl/proxy/ProxyService.html" title="class in net.jxta.impl.proxy">ProxyService</A>, <A HREF="../../../net/jxta/impl/membership/pse/PSEMembershipService.html" title="class in net.jxta.impl.membership.pse">PSEMembershipService</A>, <A HREF="../../../net/jxta/impl/endpoint/relay/RelayTransport.html" title="class in net.jxta.impl.endpoint.relay">RelayTransport</A>, <A HREF="../../../net/jxta/impl/rendezvous/RendezVousServiceImpl.html" title="class in net.jxta.impl.rendezvous">RendezVousServiceImpl</A>, <A HREF="../../../net/jxta/impl/rendezvous/RendezVousServiceInterface.html" title="class in net.jxta.impl.rendezvous">RendezVousServiceInterface</A>, <A HREF="../../../net/jxta/impl/resolver/ResolverServiceImpl.html" title="class in net.jxta.impl.resolver">ResolverServiceImpl</A>, <A HREF="../../../net/jxta/impl/resolver/ResolverServiceInterface.html" title="class in net.jxta.impl.resolver">ResolverServiceInterface</A>, <A HREF="../../../net/jxta/impl/endpoint/servlethttp/ServletHttpTransport.html" title="class in net.jxta.impl.endpoint.servlethttp">ServletHttpTransport</A>, <A HREF="../../../net/jxta/impl/access/simpleACL/SimpleACLAccessService.html" title="class in net.jxta.impl.access.simpleACL">SimpleACLAccessService</A>, <A HREF="../../../net/jxta/impl/peergroup/StartNetPeerGroup.html" title="class in net.jxta.impl.peergroup">StartNetPeerGroup</A>, <A HREF="../../../net/jxta/impl/endpoint/tcp/TcpTransport.html" title="class in net.jxta.impl.endpoint.tcp">TcpTransport</A>, <A HREF="../../../net/jxta/impl/endpoint/tls/TlsTransport.html" title="class in net.jxta.impl.endpoint.tls">TlsTransport</A></DD></DL><HR><DL><DT>public interface <B>Module</B></DL><P>This interface defines a JXTA module. All JXTA services need to implement this interface. Endpoint protocols and applications need to implement that interface if they are to be loaed and started by a PeerGroup. Service and Application implements Module, PeerGroup implements service and ShellApp implements application, as a result both implement Module. <p>Jxta Modules are given their initialization parameters via the init() method rather than a non-default constructor. <p>Modules are passed the peer group within which they are created. From the peergroup object, Modules can acccess all the peer group services. The PeerGroup within which a PeerGroup runs is known as its parent. The initial root peer group is known as the World Peer Group and is implemented by an object of class Platform, a subclass of PeerGroup. The "parent" PeerGroup of the World Peer Group is null.<P><P><DL><DT><B>See Also:</B><DD><A HREF="../../../net/jxta/protocol/ModuleImplAdvertisement.html" title="class in net.jxta.protocol"><CODE>ModuleImplAdvertisement</CODE></A>, <A HREF="../../../net/jxta/platform/ModuleClassID.html" title="class in net.jxta.platform"><CODE>ModuleClassID</CODE></A>, <A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup"><CODE>PeerGroup</CODE></A>, <A HREF="../../../net/jxta/platform/Application.html" title="interface in net.jxta.platform"><CODE>Application</CODE></A>, <A HREF="../../../net/jxta/service/Service.html" title="interface in net.jxta.service"><CODE>Service</CODE></A>, <A HREF="../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document"><CODE>Advertisement</CODE></A>, <A HREF="../../../net/jxta/id/ID.html" title="class in net.jxta.id"><CODE>ID</CODE></A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/platform/Module.html#START_AGAIN_PROGRESS">START_AGAIN_PROGRESS</A></B></CODE><BR> This is to be used mostly by co-dependent services when started as a set (such as <A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup"><CODE>PeerGroup</CODE></A> services) so that their startApp method may be invoked multiple times. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/platform/Module.html#START_AGAIN_STALLED">START_AGAIN_STALLED</A></B></CODE><BR> This is to be used mostly by co-dependent services when started as a set (such as <A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup"><CODE>PeerGroup</CODE></A> services) so that their startApp method may be invoked multiple times. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/platform/Module.html#START_OK">START_OK</A></B></CODE><BR> startApp completed successfully. </TD></TR></TABLE> <!-- ======== 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/platform/Module.html#init(net.jxta.peergroup.PeerGroup, net.jxta.id.ID, net.jxta.document.Advertisement)">init</A></B>(<A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> group, <A HREF="../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A> assignedID, <A HREF="../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> implAdv)</CODE><BR> Initialize the module, passing it its peer group and advertisement. </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/platform/Module.html#startApp(java.lang.String[])">startApp</A></B>(java.lang.String[] args)</CODE><BR> Some Modules will wait for this method being invoked, before completing their initializatino to the point that they are fully functional. </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/platform/Module.html#stopApp()">stopApp</A></B>()</CODE><BR> One can ask a Module to stop. </TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -