|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.opstring.OpStringLoader
public class OpStringLoader
The OpStringLoader utility is a helper class used to parse, validate and
return an OperationalString.
This class searches in the given classloader for a resource named
/org/rioproject/opstring/OpStringParserSelectionStrategy in the classpath.
If found the content of that resource is supposed to indicate the name of the class
to use as an OpStringParserSelectionStrategy.
| Nested Class Summary | |
|---|---|
static class |
OpStringLoader.XMLErrorHandler
An ErrorHandler for parsing |
| Field Summary | |
|---|---|
static String |
DEFAULT_FDH
Default FaultDetectionHandler |
| Constructor Summary | |
|---|---|
OpStringLoader()
Simple constructor which instantiates an OpStringLoader object that validates XML documents as they are parsed |
|
OpStringLoader(boolean verify,
ClassLoader loader)
Create a new OpStringLoader |
|
OpStringLoader(ClassLoader loader)
Create a new OpStringLoader, validating documents as they are parsed. |
|
| Method Summary | |
|---|---|
static void |
main(String[] args)
|
static ServiceElement |
makeServiceElement(ParsedService parsedSvc,
Map<String,Map<String,AssociationDescriptor[]>> associationTable)
Create a ServiceElement object from a ParsedService |
OperationalString[] |
parseOperationalString(File file)
Parse on OperationalString from a File |
OperationalString[] |
parseOperationalString(URL url)
Parse on OperationalString from a URL location. |
void |
setDefaultExportJars(String[] jars)
Set an array of jar names to be always included in a service's declaration |
void |
setDefaultGroups(String[] groups)
Set the default groups to add into the parsed OperationalString. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_FDH
| Constructor Detail |
|---|
public OpStringLoader()
throws Exception
Exception - if there are errors creating the utility
public OpStringLoader(ClassLoader loader)
throws Exception
loader - The parent ClassLoader to use for delegation
Exception - if there are errors creating the utility
public OpStringLoader(boolean verify,
ClassLoader loader)
throws Exception
verify - If true specifies that the parser produced by this code
will validate documents as they are parsed.loader - The parent ClassLoader to use for delegation
Exception - if there are errors creating the utility| Method Detail |
|---|
public void setDefaultExportJars(String[] jars)
jars - An array of jar names which will be verified as part of the
services interface resourcespublic void setDefaultGroups(String[] groups)
groups - The groups to set, must not be null
IllegalArgumentException - if the groups parameter is null or
if the groups parameter is a zero-length array
public OperationalString[] parseOperationalString(File file)
throws Exception
file - A File object for an XML or groovy file
Exception - if any errors occur parsing the document
public OperationalString[] parseOperationalString(URL url)
throws Exception
url - URL location of the OperationalString
Exception - if any errors occur parsing the document
public static ServiceElement makeServiceElement(ParsedService parsedSvc,
Map<String,Map<String,AssociationDescriptor[]>> associationTable)
throws Exception
parsedSvc - A ParsedService object, typically from loading and
parsing an OperationalString documentassociationTable - A table of named associations and descriptors
Exception - if errors occur parsing the service elementpublic static void main(String[] args)
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||