Name

AdvertisementFactory

Synopsis

The newAdvertisement( ) method of this class is used to construct advertisement documents. Advertisements read from another peer are extracted from an input stream; advertisements to be sent to another peer are constructed with the appropriate root element.

public class AdvertisementFactory extends net.jxta.util.ClassFactory {
// No Constructor
                  // Inner Classes
   public static class Instantiator; 
// Public Class Methods
   public static Advertisement newAdvertisement(String advertisementType);
   public static Advertisement newAdvertisement(TextElement root); 
   public static Advertisement newAdvertisement(MimeMediaType mimetype, InputStream stream) 
       throws IOException;
   public static Advertisement newAdvertisement(TextElement root, long timeout);
   public static Advertisement newAdvertisement(String advertisementType, long timeout);
   public static Advertisement newAdvertisement(MimeMediaType mimetype, InputStream stream, long timeout) 
       throws IOException;
   public static boolean registerAdvertisementInstance(String rootType, Class instanceClass);
// Public Methods Overriding ClassFactory
   public Class getClassForKey();  
   public Class getClassOfInstantiators();  
// Protected Methods Overriding ClassFactory
   protected java.util.Hashtable getAssocTable();  
   protected boolean registerAssoc(String className);  
}

Get JXTA in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.