|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.util.AdvCooker
public class AdvCooker
Advertisements and ID's "cooked" according to recipes lifted from J-C and Frog. Static methods meant for convenience in developing experimental propagation modules (pipe or rendezvous services, rendezvous managers) but maybe generally useful.
Constructor Summary | |
---|---|
AdvCooker()
|
Method Summary | |
---|---|
static XMLDocument |
buildCompat()
Compat's (compatibility statements) serve to narrow the search for a ModuleImplAdvertisement. |
static XMLDocument |
buildCompat(String efmt,
String bind)
Use this form for customized compatibility statements. |
static ModuleClassAdvertisement |
buildModuleClassAdvertisement(ModuleClassID mcid,
String serviceName,
String serviceDescription)
The module class advertisement is to simply advertise the existence of a module. |
static ModuleImplAdvertisement |
buildModuleImplAdvertisement(ModuleSpecID msid,
String code,
Element compat)
A ModuleImplAdvertisement represents one of any number of published implementations of a given specification. |
static ModuleImplAdvertisement |
buildModuleImplAdvertisement(ModuleSpecID msid,
String code,
Element compat,
String description,
String provider,
String uri)
Use this form to fully populate a ModuleImplAdvertisement. |
static ModuleSpecAdvertisement |
buildModuleSpecAdvertisement(ModuleSpecID msid,
String moduleSpecName,
String moduleSpecDescription)
The ModuleSpecAdvertisement has two purposes, to publish the uri of its formal specs for developers and to publish the means of remote access to the module's services if that is appropriate. |
static ModuleSpecAdvertisement |
buildModuleSpecAdvertisement(ModuleSpecID msid,
String moduleSpecName,
String moduleSpecDescription,
String creator,
String version,
String specURI)
Use this form for production provided remote access is not required. |
static ModuleSpecAdvertisement |
buildModuleSpecAdvertisement(ModuleSpecID msid,
String moduleSpecName,
String moduleSpecDescription,
String creator,
String version,
String specURI,
PipeAdvertisement pipeAdv,
ModuleSpecID proxySpecID,
ModuleSpecID authorizationSpecID,
StructuredDocument param)
Use this form for a fully populated advert. |
static ModuleImplAdvertisement |
buildPeerGroupImplAdvertisement(PeerGroup parent,
ModuleSpecID newGroupModuleSpecID,
String newDescription,
Map newServices,
Map newApps)
|
static ModuleImplAdvertisement |
buildPeerGroupImplAdvertisement(PeerGroup parent,
ModuleSpecID newGroupModuleSpecID,
String newDescription,
Map newServices,
Map newApps,
Map newProtos)
|
static ModuleImplAdvertisement |
buildPeerGroupImplAdvertisement(StdPeerGroup parent,
ModuleSpecID newGroupModuleSpecID,
String newDescription,
Map newServices)
Modifies a copy of the parent's implementation advertisement to reflect the addition or replacement of services. |
static void |
typeCheckKeys(Map moduleTable)
Module table keys must be ModuleClassID's. |
static void |
typeCheckValues(Map moduleTable)
Module table vaules must be ModuleImplAdvertisements here. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AdvCooker()
Method Detail |
---|
public static ModuleClassAdvertisement buildModuleClassAdvertisement(ModuleClassID mcid, String serviceName, String serviceDescription)
mcid
- -- the module class idserviceName
- -- something like "JXTAMOD:JXTA-WIRE-MyNewThing"serviceDescription
- -- something like "JXTA-WIRE MyNewThing Module"
public static ModuleSpecAdvertisement buildModuleSpecAdvertisement(ModuleSpecID msid, String moduleSpecName, String moduleSpecDescription)
ModuleSpecAdvertisement
)
Use this form for a minimal advertisement, suitable
for development.
msid
- -- the module spec id, "urn:jxta:uuid-[the big hex string]"moduleSpecName
- -- something like "JXTASPEC:JXTA-WIRE-MyNewThing-SPEC"moduleSpecDescription
- -- something like "JXTA-WIRE MyNewThing Specification"
public static ModuleSpecAdvertisement buildModuleSpecAdvertisement(ModuleSpecID msid, String moduleSpecName, String moduleSpecDescription, String creator, String version, String specURI)
msid
- -- the module spec id, "urn:jxta:uuid-[the big hex string]"moduleSpecName
- -- something like "JXTASPEC:JXTA-WIRE-MyNewThing-SPEC"moduleSpecDescription
- -- something like "JXTA-WIRE MyNewThing Specification"creator
- -- something like "jxta.org"version
- -- something like "Version 1.0"specURI
- -- where to locate the formal specs, e.g. "http://www.jxta.org/MyNewThing"
public static ModuleSpecAdvertisement buildModuleSpecAdvertisement(ModuleSpecID msid, String moduleSpecName, String moduleSpecDescription, String creator, String version, String specURI, PipeAdvertisement pipeAdv, ModuleSpecID proxySpecID, ModuleSpecID authorizationSpecID, StructuredDocument param)
msid
- -- the module spec id, "urn:jxta:uuid-[the big hex string]"moduleSpecName
- -- something like "JXTASPEC:JXTA-WIRE-MyNewThing-SPEC"moduleSpecDescription
- -- something like "JXTA-WIRE MyNewThing Specification"creator
- -- something like "jxta.org"version
- -- something like "Version 2.0"specURI
- -- where to locate the formal specs, e.g. "http://www.jxta.org/MyNewThing"pipeAdv
- -- to make the module useable remotely (see ModuleSpecAdvertisement
)proxySpecID
- -- sometimes required for remote use (see ModuleSpecAdvertisement
)authorizationSpecID
- -- sometimes required for remote use (see ModuleSpecAdvertisement
)param
- -- anything else
public static XMLDocument buildCompat()
public static XMLDocument buildCompat(String efmt, String bind)
efmt
- -- something like "JDK1.4"bind
- -- something like "V1.0 Ref Impl"
public static ModuleImplAdvertisement buildModuleImplAdvertisement(ModuleSpecID msid, String code, Element compat)
ModuleImplAdvertisement
.)
msid
- -- the module spec idcode
- -- the module's fully qualified classname, "net.jxta.impl.wire.MyNewThing"compat
- -- a compatibility statement. Use buildCompat() for a boilerplate.
public static ModuleImplAdvertisement buildModuleImplAdvertisement(ModuleSpecID msid, String code, Element compat, String description, String provider, String uri)
ModuleImplAdvertisement
.)
msid
- -- the module spec idcode
- -- the module's fully qualified classname, "net.jxta.impl.wire.MyNewThing"compat
- -- a compatibility statementdescription
- -- something like "MyNewThing Module, J2SE Implementation"provider
- -- something like "jxta.org"uri
- -- currently ornamental, eventually where to find binaries.
public static ModuleImplAdvertisement buildPeerGroupImplAdvertisement(StdPeerGroup parent, ModuleSpecID newGroupModuleSpecID, String newDescription, Map newServices) throws Exception
parent
- -- a running instance of the new group's parentnewGroupModuleSpecID
- -- since new or replacement services are involvednewDescription
- -- the new group's reason to benewServices
- -- advert's for the new services
IllegalArgumentException
- -- for a bad key or value type
Exception
- --- if the parent can't produce a copy of its own impl advertpublic static ModuleImplAdvertisement buildPeerGroupImplAdvertisement(PeerGroup parent, ModuleSpecID newGroupModuleSpecID, String newDescription, Map newServices, Map newApps) throws Exception
Exception
public static ModuleImplAdvertisement buildPeerGroupImplAdvertisement(PeerGroup parent, ModuleSpecID newGroupModuleSpecID, String newDescription, Map newServices, Map newApps, Map newProtos) throws Exception
Exception
public static void typeCheckValues(Map moduleTable)
moduleTable
- -- a Hashtable of services, applications or protocols.
IllegalArgumentException
- -- for an invalid key or value typepublic static void typeCheckKeys(Map moduleTable)
moduleTable
- -- a Hashtable of services, applications or protocols.
IllegalArgumentException
- -- for an invalid key or value type
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |