Package com.sun.corba.ee.impl.orb
Class DataCollectorBase
- java.lang.Object
-
- com.sun.corba.ee.impl.orb.DataCollectorBase
-
- All Implemented Interfaces:
DataCollector
- Direct Known Subclasses:
AppletDataCollector
,NormalDataCollector
,PropertyOnlyDataCollector
public abstract class DataCollectorBase extends java.lang.Object implements DataCollector
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
configurationHostName
protected java.lang.String
localHostName
private java.util.Properties
originalProps
private java.util.Set<java.lang.String>
propertyNames
private java.util.Set<java.lang.String>
propertyPrefixes
private java.util.Properties
resultProps
private boolean
setParserCalled
private java.util.Set<java.lang.String>
URLPropertyNames
-
Constructor Summary
Constructors Constructor Description DataCollectorBase(java.util.Properties props, java.lang.String localHostName, java.lang.String configurationHostName)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
checkPropertyDefaults()
private void
checkSetParserCalled()
protected abstract void
collect()
private void
doProperties(java.util.Properties props)
private java.lang.String
findMatchingPropertyName(java.util.Set<java.lang.String> names, java.lang.String suffix)
private void
findPropertiesByName(java.util.Iterator<java.lang.String> names, PropertyCallback getProperty)
private void
findPropertiesByPrefix(java.util.Set<java.lang.String> prefixes, java.util.Iterator<java.lang.String> propertyNames, PropertyCallback getProperty)
protected void
findPropertiesFromApplet(java.applet.Applet app)
protected void
findPropertiesFromArgs(java.lang.String[] params)
protected void
findPropertiesFromFile()
protected void
findPropertiesFromProperties()
protected void
findPropertiesFromSystem()
private java.util.Set<java.lang.String>
getCORBAPrefixes(java.util.Set<java.lang.String> prefixes)
private java.util.Properties
getFileProperties()
java.util.Properties
getProperties()
Return the consolidated property information to be used for ORB configuration.private void
getPropertiesFromFile(java.util.Properties props, java.lang.String fileName)
private static java.lang.String
getSystemProperty(java.lang.String name)
private static java.util.Iterator<java.lang.String>
getSystemPropertyNames()
private boolean
hasCORBAPrefix(java.lang.String prefix)
boolean
initialHostIsLocal()
Return true iff the local host and ORB initial host are the same.abstract boolean
isApplet()
Return true iff this DataCollector was created from applet data.private static java.util.Iterator<java.lang.String>
makeIterator(java.util.Enumeration<?> enumeration)
void
setParser(PropertyParser parser)
Set the parser which is used to obtain property names.private void
setProperty(java.lang.String name, java.lang.String value)
-
-
-
Field Detail
-
propertyNames
private java.util.Set<java.lang.String> propertyNames
-
propertyPrefixes
private java.util.Set<java.lang.String> propertyPrefixes
-
URLPropertyNames
private java.util.Set<java.lang.String> URLPropertyNames
-
localHostName
protected java.lang.String localHostName
-
configurationHostName
protected java.lang.String configurationHostName
-
setParserCalled
private boolean setParserCalled
-
originalProps
private java.util.Properties originalProps
-
resultProps
private java.util.Properties resultProps
-
-
Method Detail
-
initialHostIsLocal
public boolean initialHostIsLocal()
Description copied from interface:DataCollector
Return true iff the local host and ORB initial host are the same. This is provided to avoid exposing the local host in insecure contexts.- Specified by:
initialHostIsLocal
in interfaceDataCollector
- Returns:
- if the local host and ORB initial host are the same
-
setParser
public void setParser(PropertyParser parser)
Description copied from interface:DataCollector
Set the parser which is used to obtain property names. This must be called before getProperties may be called. It may be called multiple times if different sets of properties are needed for the same data sources.- Specified by:
setParser
in interfaceDataCollector
- Parameters:
parser
- parser used to obtain property names
-
getProperties
public java.util.Properties getProperties()
Description copied from interface:DataCollector
Return the consolidated property information to be used for ORB configuration. Note that -ORBInitRef arguments are handled specially: all -ORBInitRef name=value arguments are converted into ( org.omg.CORBA.ORBInitRef.name, value ) mappings in the resulting properties. Also, -ORBInitialServices is handled specially in applet mode: they are converted from relative to absolute URLs.- Specified by:
getProperties
in interfaceDataCollector
- Returns:
- consolidated property information
-
isApplet
public abstract boolean isApplet()
Description copied from interface:DataCollector
Return true iff this DataCollector was created from applet data.- Specified by:
isApplet
in interfaceDataCollector
- Returns:
- if this was created from an applet
-
collect
protected abstract void collect()
-
checkPropertyDefaults
protected void checkPropertyDefaults()
-
findPropertiesFromArgs
protected void findPropertiesFromArgs(java.lang.String[] params)
-
findPropertiesFromApplet
protected void findPropertiesFromApplet(java.applet.Applet app)
-
doProperties
private void doProperties(java.util.Properties props)
-
findPropertiesFromFile
protected void findPropertiesFromFile()
-
findPropertiesFromProperties
protected void findPropertiesFromProperties()
-
findPropertiesFromSystem
protected void findPropertiesFromSystem()
-
setProperty
private void setProperty(java.lang.String name, java.lang.String value)
-
checkSetParserCalled
private void checkSetParserCalled()
-
findPropertiesByPrefix
private void findPropertiesByPrefix(java.util.Set<java.lang.String> prefixes, java.util.Iterator<java.lang.String> propertyNames, PropertyCallback getProperty)
-
findPropertiesByName
private void findPropertiesByName(java.util.Iterator<java.lang.String> names, PropertyCallback getProperty)
-
getSystemProperty
private static java.lang.String getSystemProperty(java.lang.String name)
-
findMatchingPropertyName
private java.lang.String findMatchingPropertyName(java.util.Set<java.lang.String> names, java.lang.String suffix)
-
makeIterator
private static java.util.Iterator<java.lang.String> makeIterator(java.util.Enumeration<?> enumeration)
-
getSystemPropertyNames
private static java.util.Iterator<java.lang.String> getSystemPropertyNames()
-
getPropertiesFromFile
private void getPropertiesFromFile(java.util.Properties props, java.lang.String fileName)
-
getFileProperties
private java.util.Properties getFileProperties()
-
hasCORBAPrefix
private boolean hasCORBAPrefix(java.lang.String prefix)
-
getCORBAPrefixes
private java.util.Set<java.lang.String> getCORBAPrefixes(java.util.Set<java.lang.String> prefixes)
-
-