Project JXTA

net.jxta.protocol
Class ServiceAdvertisement

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

public abstract class ServiceAdvertisement
extends Advertisement

This abstract class defines a Service Advertisement. Service advertisement describe an implementation of a peer group service or a peer service. The service advertisement describes the necessary information to a peer to download a version of the service on the peer and to configure the service as a peer group service or as a peer service.
Note: ServiceAdvertisement is also used to describe the main Application of a PeerGroup.

A service advertisement is part of a Peer or PeerGroup Advertisement

 <?xml version="1.0"?>
 <ServiceAdvertisement>
   <Name> name </Name>
   <Version> version </Version>
   <Uri> Uri </Uri>
   <Provider> provider </Provider>
   <Security> security </Security>
   <Code>  implementation code </Code>
 </ServiceAdvertisement>

Since:
JXTA 1.0
See Also:
PeerGroupAdvertisement, PeerAdvertisement, ServiceAdvertisement

Constructor Summary
ServiceAdvertisement()
           
 
Method Summary
static java.lang.String getAdvertisementType()
          returns the advertisement type
 java.lang.String getCode()
          returns the service implementation
 java.lang.String getKeywords()
          returns the service search keywords
 java.lang.String getName()
          returns the name of the service
 java.util.Vector getParams()
          returns the service params
 PipeAdvertisement getPipe()
          returns the pipe advertisment for this service
 java.lang.String getProvider()
          returns the provider information for the service
 java.lang.String getSecurity()
          returns the security service advertisement
 java.lang.String getUri()
          returns the uri
 java.lang.String getVersion()
          returns the service version number
 void setCode(java.lang.String code)
          sets the service implementation
 void setKeywords(java.lang.String keywords)
          sets the the service seach keywords
 void setName(java.lang.String name)
          sets the name
 void setParams(java.util.Vector params)
          sets the service params
 void setPipe(PipeAdvertisement pipe)
          sets the pipe advertisement for the service
 void setProvider(java.lang.String provider)
          sets the service provider information
 void setSecurity(java.lang.String security)
          sets the security service name for this service
 void setUri(java.lang.String uri)
          sets the uri
 void setVersion(java.lang.String version)
          sets the version of the service
 
Methods inherited from class net.jxta.document.Advertisement
getDocument, getLocalExpirationTime, setExpiration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceAdvertisement

public ServiceAdvertisement()
Method Detail

getAdvertisementType

public static java.lang.String getAdvertisementType()
returns the advertisement type
Returns:
String type
Since:
JXTA 1.0

getName

public java.lang.String getName()
returns the name of the service
Returns:
String name
Since:
JXTA 1.0

setName

public void setName(java.lang.String name)
sets the name
Parameters:
string - name
Since:
JXTA 1.0

getVersion

public java.lang.String getVersion()
returns the service version number
Returns:
String version number
Since:
JXTA 1.0

setVersion

public void setVersion(java.lang.String version)
sets the version of the service
Parameters:
version - version number
Since:
JXTA 1.0

getProvider

public java.lang.String getProvider()
returns the provider information for the service
Returns:
String provider information
Since:
JXTA 1.0

setProvider

public void setProvider(java.lang.String provider)
sets the service provider information
Parameters:
provider - information
Since:
JXTA 1.0

getUri

public java.lang.String getUri()
returns the uri
Returns:
String uri
Since:
JXTA 1.0

setUri

public void setUri(java.lang.String uri)
sets the uri
Parameters:
uri - string uri
Since:
JXTA 1.0

getCode

public java.lang.String getCode()
returns the service implementation
Returns:
String service implementation
Since:
JXTA 1.0

setCode

public void setCode(java.lang.String code)
sets the service implementation
Parameters:
code - string service implementation
Since:
JXTA 1.0

getSecurity

public java.lang.String getSecurity()
returns the security service advertisement
Returns:
String security service
Since:
JXTA 1.0

setSecurity

public void setSecurity(java.lang.String security)
sets the security service name for this service
Parameters:
security - security service
Since:
JXTA 1.0

getPipe

public PipeAdvertisement getPipe()
returns the pipe advertisment for this service
Returns:
PipeAdvertisement pipe advertisement
Since:
JXTA 1.0

setPipe

public void setPipe(PipeAdvertisement pipe)
sets the pipe advertisement for the service
Parameters:
pipe - advertisment pipe for the service
Since:
JXTA 1.0

getKeywords

public java.lang.String getKeywords()
returns the service search keywords
Returns:
String keywords associated with the service
Since:
JXTA 1.0

setKeywords

public void setKeywords(java.lang.String keywords)
sets the the service seach keywords
Parameters:
keywords - string keywords associated with the plocy
Since:
JXTA 1.0

getParams

public java.util.Vector getParams()
returns the service params
Returns:
Vector params containing a collection of Strings
Since:
JXTA 1.0

setParams

public void setParams(java.util.Vector params)
sets the service params
Parameters:
params - vector of service params
Since:
JXTA 1.0

Project JXTA