Name
AdvertisementFactory.Instantiator
Synopsis
Classes that implement this interface
are called by the AdvertisementFactory
to create
specific advertisment types. The standard advertisement types have a
default instantiator that they use (transparent to the developer); if
you create your own advertisement class, then you must create an
appropriate instantiator for it. The instantiator class must be named
Instantiator
and be an inner class of your
advertisement class; e.g., if your class is named
MyAdv
, then your instantiator would be called
MyAdv.Instantiator
.
public static interface AdvertisementFactory.Instantiator { // Public Instance Methods public abstract String getAdvertisementType(); public abstract Advertisement newInstance(); public abstract Advertisement newInstance(Element root); }
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.