Project JXTA

net.jxta.impl.protocol
Class ModuleSpecAdv.Instantiator

java.lang.Object
  extended by net.jxta.impl.protocol.ModuleSpecAdv.Instantiator
All Implemented Interfaces:
AdvertisementFactory.Instantiator
Enclosing class:
ModuleSpecAdv

public static class ModuleSpecAdv.Instantiator
extends Object
implements AdvertisementFactory.Instantiator


Constructor Summary
ModuleSpecAdv.Instantiator()
           
 
Method Summary
 String getAdvertisementType()
          Returns the identifying type of this Advertisement.
 Advertisement newInstance()
          Constructs an instance of Advertisement matching the type specified by the advertisementType parameter.
 Advertisement newInstance(Element root)
          Constructs an instance of Advertisement matching the type specified by the advertisementType parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModuleSpecAdv.Instantiator

public ModuleSpecAdv.Instantiator()
Method Detail

getAdvertisementType

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

Specified by:
getAdvertisementType in interface AdvertisementFactory.Instantiator
Returns:
String the type of advertisement
Since:
JXTA 1.0

newInstance

public Advertisement newInstance()
Constructs an instance of Advertisement matching the type specified by the advertisementType parameter.

Specified by:
newInstance in interface AdvertisementFactory.Instantiator
Parameters:
advertisementType - Specifies the mime media type to be associated with the StructuredDocument to be created.
Returns:
The instance of Advertisement or null if it could not be created.
Throws:
InvocationTargetException - error invoking target constructor
Since:
JXTA 1.0

newInstance

public Advertisement newInstance(Element root)
Constructs an instance of Advertisement matching the type specified by the advertisementType parameter.

Specified by:
newInstance in interface AdvertisementFactory.Instantiator
Parameters:
root - Specifies a portion of a StructuredDocument which will be converted into an Advertisement.
Returns:
The instance of Advertisement or null if it could not be created.
Throws:
InvocationTargetException - error invoking target constructor
Since:
JXTA 1.0

JXTA J2SE