Esempio n. 1
0
  /**
   * Create a new blocking output pipe
   *
   * @param group The peergroup context.
   * @param pAdv advertisement for the pipe we are supporting.
   * @param peerID the destination <code>PeerID</code>.
   * @param route the destination route.
   * @throws IOException for failures creating a pipe to the destination peer.
   */
  public BlockingWireOutputPipe(
      PeerGroup group, PipeAdvertisement pAdv, PeerID peerID, RouteAdvertisement route)
      throws IOException {
    this.pAdv = pAdv;
    this.group = group;
    this.endpoint = group.getEndpointService();
    destination =
        new EndpointAddress(
            "jxta", peerID.getUniqueValue().toString(), "PipeService", pAdv.getID().toString());
    this.route = route;

    checkMessenger();

    if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
      LOG.info("Created output pipe for " + getPipeID());
    }
  }