Project JXTA

net.jxta.protocol
Class PipeAdvertisement

java.lang.Object
  |
  +--net.jxta.document.Advertisement
        |
        +--net.jxta.protocol.PipeAdvertisement
All Implemented Interfaces:
java.lang.Cloneable

public abstract class PipeAdvertisement
extends Advertisement
implements java.lang.Cloneable

This class defines the PipeServiceImpl Advertisement

The default behavior of this abstract class is to simple be a place holder for the PipeServiceImpl 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 PipeServiceImpl Advertisements is let to the application. A Jxta PipeServiceImpl advertisement is an XML document (non validated) which contains at least the following structure (but can be extended).

 <?xml version="1.0"?>
 <jxta:PipeAdvertisement;>
   <Id> UUID </Id>
   <Type> type of the pipe </Type>
   <Name> optional symbolic name than can be used by
      any search engine </Name>
 </jxta:PipeAdvertisement;>

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

The UUID needs to be a unique String (unique in time and space).

Since:
JXTA 1.0
Version:
$Revision: 1.19 $

Field Summary
static java.lang.String IdTag
          XML tag to store the PipeID
static java.lang.String NameTag
          XML tag to store the name of the Pipe
static java.lang.String TypeTag
          XML tag to store the Pipe Type
 
Constructor Summary
PipeAdvertisement()
           
 
Method Summary
 java.lang.Object clone()
          Clone this PipeAdvertisement
static java.lang.String getAdvertisementType()
          get the pipe type
 ID getID()
          get an ID for indexing purposes.
 java.lang.String getName()
          get the symbolic name associated with the pipe
 ID getPipeID()
          get the pipe id
 java.lang.String getType()
          get the pipe type
 void setName(java.lang.String n)
          set the symbolic name associated with the pipe
 void setPipeID(ID pipeId)
          set the pipe Id
 void setType(java.lang.String type)
          set the pipe type
 
Methods inherited from class net.jxta.document.Advertisement
getDocument
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IdTag

public static final java.lang.String IdTag
XML tag to store the PipeID

TypeTag

public static final java.lang.String TypeTag
XML tag to store the Pipe Type

NameTag

public static final java.lang.String NameTag
XML tag to store the name of the Pipe
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

clone

public java.lang.Object clone()
Clone this PipeAdvertisement
Overrides:
clone in class Advertisement
Returns:
Object an object of class PipeAdvertisement that is a deep-enough copy of this one.
Since:
JXTA 1.0

getID

public ID getID()
get an ID for indexing purposes. The PipeID uniquely identifies this ADV.
Overrides:
getID in class Advertisement
Returns:
ID The Pipe ID itself.
Since:
JXTA 1.0

getPipeID

public ID getPipeID()
get the pipe id
Returns:
ID PipeServiceImpl id
Since:
JXTA 1.0

setPipeID

public void setPipeID(ID pipeId)
set the pipe Id
Parameters:
id - The PipeId to be set.
Since:
JXTA 1.0

getType

public java.lang.String getType()
get the pipe type
Returns:
String PipeService type
Since:
JXTA 1.0

setType

public void setType(java.lang.String type)
set the pipe type
Parameters:
type - The type to be set.
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