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

📄 rendezvousservice.java

📁 jxta_src_2.41b jxta 2.41b 最新版源码 from www.jxta.org
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
     * This limits the risk of accidental propagation storms, although they     * can always be engineered deliberately.     *     * @param  msg              is the message to propagate.     * @param  serviceName      is the name of the service.     * @param  serviceParam     is the parameter of the service.     * @param  ttl              The requested TTL for the message.     * @exception  IOException  if an io error occurs     */    public void propagate(Message msg, String serviceName, String serviceParam, int ttl) throws IOException;    /**     * Propagates a message to the specified peers.     *     * @param  destPeerIds      An enumeration of PeerIDs of the peers that are the     * intended recipients of the propgated message.     * @param  msg              The message to propagate.     * @param  serviceName      The name of the service.     * @param  serviceParam     The parameter of the service.     * @param  ttl              The requested TTL for the message.     * @exception  IOException  if an io error occurs     */    public void propagate(Enumeration destPeerIds, Message msg, String serviceName, String serviceParam, int ttl) throws IOException;    /**     * Propagates a message to members of the peer group reachable via the     * local network. Typically this is accomplished by broadcasting or     * multicasting.     *     * <p/>Only a single HOP at a time is performed. Messages are always     * delivered to the destination handler on arrival. This handler     * is responsible for repropagating further, if deemed appropropriate.     *     * <p/>Loop and TTL control are performed automatically.     *     * <p/>Messages can be propagated via this method for the first time or     * can be re-propagated by re-using a message that came in via propagation.     * In the later case, the TTL and loop detection parameters CANNOT be     * re-initialized. If one wants to "re-propagate" a message with a new TTL     * and blank gateways list one must generate a completely new message.     * This limits the risk of accidental propagation storms, although they     * can always be engineered deliberately.     *     * @param  msg              is the message to propagate.     * @param  serviceName      is the name of the service.     * @param  serviceParam     is the parameter of the service.     * @param  prunePeer        is a peer to prune in the propagation.     * @param  ttl              The requested TTL for the message.     * @exception  IOException  if an io error occurs     * @deprecated              The prunePeer parameter is ignored and as such this varient     * is not needed.     */    public void propagateToNeighbors(Message msg, String serviceName, String serviceParam, int ttl, String prunePeer) throws IOException;    /**     * Propagates a message to members of the peer group reachable via the     * local network. Typically this is accomplished by broadcasting or     * multicasting.     *     * <p/>Only a single HOP at a time is performed. Messages are always     * delivered to the destination handler on arrival. This handler     * is responsible for repropagating further, if deemed appropropriate.     *     * <p/>Loop and TTL control are performed automatically.     *     * <p/>Messages can be propagated via this method for the first time or     * can be re-propagated by re-using a message that came in via propagation.     * In the later case, the TTL and loop detection parameters CANNOT be     * re-initialized. If one wants to "re-propagate" a message with a new TTL     * and blank gateways list one must generate a completely new message.     * This limits the risk of accidental propagation storms, although they     * can always be engineered deliberately.     *     * @param  msg              is the message to propagate.     * @param  serviceName      is the name of the service.     * @param  serviceParam     is the parameter of the service.     * @param  ttl              The requested TTL for the message.     * @exception  IOException  if an io error occurs     */    public void propagateToNeighbors(Message msg, String serviceName, String serviceParam, int ttl) throws IOException;    /**     * Propagates a message to as many members of the peer group as possible.     *     * <p/>Only a single HOP at a time is performed. Messages are always     * delivered to the destination handler on arrival. This handler     * is responsible for repropagating further, if deemed appropropriate.     *     * <p/>Loop and TTL control are performed automatically.     *     * <p/>Messages can be propagated via this method for the first time or     * can be re-propagated by re-using a message that came in via propagation.     * In the later case, the TTL and loop detection parameters CANNOT be     * re-initialized. If one wants to "re-propagate" a message with a new TTL     * and blank gateways list one must generate a completely new message.     * This limits the risk of accidental propagation storms, although they     * can always be engineered deliberately.     *     * @param  msg              is the message to propagate.     * @param  serviceName      is the name of the service     * @param  serviceParam     is the parameter of the service     * @param  ttl              The requested TTL for the message.     * @param  prunePeer        is a peer to prune in the propagation.     * @exception  IOException  if an io error occurs     * @deprecated              The prunePeer parameter is ignored and as such this varient     * is not needed.     */    public void propagateInGroup(Message msg, String serviceName, String serviceParam, int ttl, String prunePeer) throws IOException;    /**     * Propagates a message to as many members of the peer group as possible.     *     * <p/>Only a single HOP at a time is performed. Messages are always     * delivered to the destination handler on arrival. This handler     * is responsible for repropagating further, if deemed appropropriate.     *     * <p/>Loop and TTL control are performed automatically.     *     * <p/>Messages can be propagated via this method for the first time or     * can be re-propagated by re-using a message that came in via propagation.     * In the later case, the TTL and loop detection parameters CANNOT be     * re-initialized. If one wants to "re-propagate" a message with a new TTL     * and blank gateways list one must generate a completely new message.     * This limits the risk of accidental propagation storms, although they     * can always be engineered deliberately.     *     * @param  msg              is the message to propagate.     * @param  serviceName      is the name of the service     * @param  serviceParam     is the parameter of the service     * @param  ttl              The requested TTL for the message.     * @exception  IOException  if an io error occurs     */    public void propagateInGroup(Message msg, String serviceName, String serviceParam, int ttl) throws IOException;    /**     * Return true if connected to a rendezvous.     *     * @return    true if connected to a rendezvous, false otherwise     */    public boolean isConnectedToRendezVous();    /**     * Returns the role status of this peer.     *     * @return    <tt>true</tt> if this Peer is acting as a "rendezvous" per the     * implementation definition.     */    public boolean isRendezVous();    /**     *  Returns the current status of this peer within the current group.     *     * @return    the current status.     */    public RendezVousStatus getRendezVousStatus();    /**     *  Enable or disable the automatic switching between an Edge Peer     *  and a Rendezvous Peer.     *     * @param  auto  true will activate automatic switching     * @return       the previous value of this mode     */    public boolean setAutoStart(boolean auto);    /**     *  Enable or disable the automatic switching between an Edge Peer     *  and a Rendezvous Peer.     *     * @param  auto    <tt>true</tt> will activate automatic switching     * @param  period  The period of auto-checking     * @return         The previous value of this mode.     */    public boolean setAutoStart(boolean auto, long period);    /**     * Walk a message through the rendezvous peers of the network: only     * rendezvous peers will receive the message.     *     * <p/>Only a single HOP at a time is performed. Messages are always     * delivered to the destination handler on arrival. This handler     * is responsible for repropagating further, if deemed appropropriate.     *     * <p/>Loop and TTL control are performed automatically.     *     * <p/>Messages can be propagated via this method for the first time or     * can be re-propagated by re-using a message that came in via propagation.     * In the later case, the TTL and loop detection parameters CANNOT be     * re-initialized. If one wants to "re-propagate" a message with a new TTL     * and blank gateways list one must generate a completely new message.     * This limits the risk of accidental propagation storms, although they     * can always be engineered deliberately.     *     * <p/><b>Note</b>: The original msg is not modified and may be reused upon return.     *     * @param  msg           is the message to walk.     * @param  serviceName   is the name of the service     * @param  serviceParam  is the parameter of the service     * @param  ttl           is the maximum TTL of the message.     * @throws  IOException  when walking the message is impossible (network failure)     */    public void walk(Message msg, String serviceName, String serviceParam, int ttl) throws IOException;    /**     * <p/>Walk a message through the rendezvous peers of the network: only     * rendezvous peers will receive the message.     *     * <p/>Only a single HOP at a time is performed. Messages are always     * delivered to the destination handler on arrival. This handler     * is responsible for repropagating further, if deemed appropropriate.     *     * <p/>Loop and TTL control are performed automatically.     *     * <p/>Messages can be propagated via this method for the first time or     * can be re-propagated by re-using a message that came in via propagation.     * In the later case, the TTL and loop detection parameters CANNOT be     * re-initialized. If one wants to "re-propagate" a message with a new TTL     * and blank gateways list one must generate a completely new message.     * This limits the risk of accidental propagation storms, although they     * can always be engineered deliberately.     *     * <p/><b>Note</b>: The original msg is not modified and may be reused upon return.     *     * @param  destPeerIDs   is a Vector of PeerIDs of the peers which are receiving     * first the walker. Note that each entry in the Vector will create its own     * walker.     * @param  msg           is the message to walk.     * @param  serviceName   is the name of the service     * @param  serviceParam  is the parameter of the service     * @param  ttl           is the maximum TTL of the message.     * @throws  IOException  when walking the message is impossible (network failure)     */    public void walk(Vector destPeerIDs, Message msg, String serviceName, String serviceParam, int ttl) throws IOException;    /**     * Returns a vector of RdvAdvertisement of the local view of rendezvous peers.     *     *  <p/><ul>     *      <li>Values are {@link net.jxta.protocol.RdvAdvertisement}.</li>     *  </ul>     *     * @return    Vector containing RdvAdvertisement of the local view of RDV peers.     */    public Vector getLocalWalkView();    /**     * Set a new deadline for the rendezvous to be proven alive.     * As a result a lease reponse must be sought and obtained within the     * specified delay or the rdv is considered disconnected.     * So, if a lease scheme is used, this can be implemented simply by     * setting the new lease deadLine accordingly.     *     * <p/>A timeout of 0 or less triggers immediate disconnection.     *     * @param  peer     The peer to be challenged     * @param  timeout  The delay     */    public void challengeRendezVous(ID peer, long timeout);}

⌨️ 快捷键说明

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