JXTA

net.jxta.protocol
Class TransportAdvertisement

java.lang.Object
  extended by net.jxta.document.Advertisement
      extended by net.jxta.document.ExtendableAdvertisement
          extended by net.jxta.protocol.TransportAdvertisement

public abstract class TransportAdvertisement
extends ExtendableAdvertisement

This abstract class defines a Transport advertisement. Each peer endpoint protocol is associated with a transport advertisement that describes the protocol and network interface associated with the endpoint transport. For example for TCP endpoint. the following transport information needs to be maintained for this endpoint:

Transport :

This class is an abstract class that needs to be extended by implementation to support the different types of transport advertisements (TCP, HTTP, etc)

 <?xml version="1.0"?>
  <TransportAdvertisement type="HTTPAdvertisement">
          ..........
  </TransportAdvertisement>
 

See Also:
AccessPointAdvertisement

Field Summary
protected  String protocol
           
 
Constructor Summary
TransportAdvertisement()
           
 
Method Summary
static String getAdvertisementType()
          Returns the identifying type of this Advertisement.
 String getBaseAdvType()
          Returns the base type of this advertisement hierarchy.
 ID getID()
          Return ID for indexing.
 String getProtocol()
          Sets the URI scheme to be used for EndpointAddresses of this Message Transport.
 void setProtocol(String protocol)
          Returns the URI scheme to be used for EndpointAddresses of this Message Transport.
 
Methods inherited from class net.jxta.document.ExtendableAdvertisement
getDocument, handleAttribute, handleElement
 
Methods inherited from class net.jxta.document.Advertisement
clone, getAdvType, getIndexFields, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

protocol

protected String protocol
Constructor Detail

TransportAdvertisement

public TransportAdvertisement()
Method Detail

getAdvertisementType

public static String getAdvertisementType()
Returns the identifying type of this Advertisement.

Returns:
String the type of advertisement

getBaseAdvType

public final String getBaseAdvType()
Returns the base type of this advertisement hierarchy. Typically, only the most basic advertisement of a type will implement this method and declare it as final.

Specified by:
getBaseAdvType in class ExtendableAdvertisement
Returns:
String the base type of advertisements in this hierarchy.

getID

public ID getID()
Return ID for indexing. We don't have one so return the nullID.

Specified by:
getID in class Advertisement
Returns:
jxta id associated with this advertisement.

getProtocol

public String getProtocol()
Sets the URI scheme to be used for EndpointAddresses of this Message Transport.

Returns:
The URI scheme used for EndpointAddresses of this Message Transport.

setProtocol

public void setProtocol(String protocol)
Returns the URI scheme to be used for EndpointAddresses of this Message Transport.

Parameters:
protocol - The URI scheme used for EndpointAddresses of this Message Transport.

JXSE