|
Project JXTA | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.util.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 StructuredTextDocument |
buildCompat()
Compat's (compatibility statements) serve to narrow the search for a ModuleImplAdvertisement. |
static StructuredTextDocument |
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 ModuleClassID |
buildModuleClassID(String uri)
Reconstructs a ModuleClassID from its String representation as printed by the foregoing recipes. |
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 ModuleSpecID |
buildModuleSpecID(String uri)
Reconstructs a ModuleSpecID from its String representation as printed by the foregoing recipes. |
static ModuleImplAdvertisement |
buildPeerGroupImplAdvertisement(PeerGroup parent,
ModuleSpecID newGroupModuleSpecID,
String newDescription,
Hashtable newServices,
Hashtable newApps)
|
static ModuleImplAdvertisement |
buildPeerGroupImplAdvertisement(PeerGroup parent,
ModuleSpecID newGroupModuleSpecID,
String newDescription,
Hashtable newServices,
Hashtable newApps,
Hashtable newProtos)
|
static ModuleImplAdvertisement |
buildPeerGroupImplAdvertisement(StdPeerGroup parent,
ModuleSpecID newGroupModuleSpecID,
String newDescription,
Hashtable newServices)
Modifies a copy of the parent's implementation advertisement to reflect the addition or replacement of services. |
static void |
printNewClassAndModuleID()
Prints public static String declarations of new module class and spec ID's for hardcoding into a module, as per J-C's posted recipe. |
static void |
printNewClassAndModuleID(ModuleClassID baseClassID)
Use this form if your module is a custom implementation of a well-known module such as RendezvousServiceImpl. |
static void |
typeCheckKeys(Hashtable moduleTable)
Module table keys must be ModuleClassID's. |
static void |
typeCheckValues(Hashtable 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 void printNewClassAndModuleID()
public static void printNewClassAndModuleID(ModuleClassID baseClassID)
baseClassID
- --the class ID of the module to customized, e.g.
that of RendezvousServiceImpl.public static ModuleClassID buildModuleClassID(String uri) throws URISyntaxException
MalformedURLException
- -- if url is messed up
UnknownServiceException
- --if urn: isn't supported, meaning a jar is missing
URISyntaxException
public static ModuleSpecID buildModuleSpecID(String uri) throws URISyntaxException
MalformedURLException
- -- if url is messed up
UnknownServiceException
- --if urn: isn't supported, meaning a jar is missing
URISyntaxException
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 1.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 StructuredTextDocument buildCompat()
public static StructuredTextDocument 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, Hashtable newServices) throws IllegalArgumentException, 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, Hashtable newServices, Hashtable newApps) throws IllegalArgumentException, Exception
IllegalArgumentException
Exception
public static ModuleImplAdvertisement buildPeerGroupImplAdvertisement(PeerGroup parent, ModuleSpecID newGroupModuleSpecID, String newDescription, Hashtable newServices, Hashtable newApps, Hashtable newProtos) throws IllegalArgumentException, Exception
IllegalArgumentException
Exception
public static void typeCheckValues(Hashtable moduleTable) throws IllegalArgumentException
moduleTable
- -- a Hashtable of services, applications or protocols.
IllegalArgumentException
- -- for an invalid key or value typepublic static void typeCheckKeys(Hashtable moduleTable) throws IllegalArgumentException
moduleTable
- -- a Hashtable of services, applications or protocols.
IllegalArgumentException
- -- for an invalid key or value type
|
JXTA J2SE | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |