Project JXTA

net.jxta.protocol
Class PipeAdvertisement

java.lang.Object
  |
  +--net.jxta.document.Advertisement
        |
        +--net.jxta.protocol.PipeAdvertisement

public abstract class PipeAdvertisement
extends Advertisement

This class defines the PipeService Advertisement

The default behavior of this abstract class is to simple be a place holder for the PipeService Id and its name. No XML document is processed. That has to be done in the class that implements PipeAdvertisement. Pipes are named with their XML advertisement. The generation of the PipeService Advertisements is let to the application. A Jxta PipeService advertisement is an XML document (non validated) which contains at least the following structure (but can be extended).

 <?xml version="1.0"?>
 <JxtaPipe>
   <id> UUID </id>
   <name> optional symbolic name than can be used by
      any search engine </name>
 </JxtaPipe>

Note that other tags can be provided by the application for its own profit. Those extra tags are not interpreted by the PipeService Service.

The UUID needs to be a unique String (unique in time and space). The optional tool package net.jxtax.pipe provides helper classes to build PipeService Advertisement (net.jxtax.pipe.PipeAdv);

Since:
JXTA 1.0

Constructor Summary
PipeAdvertisement()
           
 
Method Summary
static java.lang.String getAdvertisementType()
          get the pipe type
 java.lang.String getName()
          get the symbolic name associated with the pipe
 PipeID getPipeID()
          get the pipe id
 void setName(java.lang.String n)
          set the symbolic name associated with the pipe
 void setPipeID(PipeID id)
          set the pipe Id
 
Methods inherited from class net.jxta.document.Advertisement
getDocument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PipeAdvertisement

public PipeAdvertisement()
Method Detail

getAdvertisementType

public static java.lang.String getAdvertisementType()
get the pipe type
Returns:
String PipeAdvertisement type
Since:
JXTA 1.0

getPipeID

public PipeID getPipeID()
get the pipe id
Returns:
String PipeService id
Since:
JXTA 1.0

setPipeID

public void setPipeID(PipeID id)
set the pipe Id
Returns:
String PipeId
Since:
JXTA 1.0

getName

public java.lang.String getName()
get the symbolic name associated with the pipe
Returns:
String the name field.
Since:
JXTA 1.0

setName

public void setName(java.lang.String n)
set the symbolic name associated with the pipe
Parameters:
n - the name this pipe adv should have.
Since:
JXTA 1.0

Project JXTA