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.StringconfigurationHostNameprotected java.lang.StringlocalHostNameprivate java.util.PropertiesoriginalPropsprivate java.util.Set<java.lang.String>propertyNamesprivate java.util.Set<java.lang.String>propertyPrefixesprivate java.util.PropertiesresultPropsprivate booleansetParserCalledprivate 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 voidcheckPropertyDefaults()private voidcheckSetParserCalled()protected abstract voidcollect()private voiddoProperties(java.util.Properties props)private java.lang.StringfindMatchingPropertyName(java.util.Set<java.lang.String> names, java.lang.String suffix)private voidfindPropertiesByName(java.util.Iterator<java.lang.String> names, PropertyCallback getProperty)private voidfindPropertiesByPrefix(java.util.Set<java.lang.String> prefixes, java.util.Iterator<java.lang.String> propertyNames, PropertyCallback getProperty)protected voidfindPropertiesFromApplet(java.applet.Applet app)protected voidfindPropertiesFromArgs(java.lang.String[] params)protected voidfindPropertiesFromFile()protected voidfindPropertiesFromProperties()protected voidfindPropertiesFromSystem()private java.util.Set<java.lang.String>getCORBAPrefixes(java.util.Set<java.lang.String> prefixes)private java.util.PropertiesgetFileProperties()java.util.PropertiesgetProperties()Return the consolidated property information to be used for ORB configuration.private voidgetPropertiesFromFile(java.util.Properties props, java.lang.String fileName)private static java.lang.StringgetSystemProperty(java.lang.String name)private static java.util.Iterator<java.lang.String>getSystemPropertyNames()private booleanhasCORBAPrefix(java.lang.String prefix)booleaninitialHostIsLocal()Return true iff the local host and ORB initial host are the same.abstract booleanisApplet()Return true iff this DataCollector was created from applet data.private static java.util.Iterator<java.lang.String>makeIterator(java.util.Enumeration<?> enumeration)voidsetParser(PropertyParser parser)Set the parser which is used to obtain property names.private voidsetProperty(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:DataCollectorReturn 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:
initialHostIsLocalin interfaceDataCollector- Returns:
- if the local host and ORB initial host are the same
-
setParser
public void setParser(PropertyParser parser)
Description copied from interface:DataCollectorSet 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:
setParserin interfaceDataCollector- Parameters:
parser- parser used to obtain property names
-
getProperties
public java.util.Properties getProperties()
Description copied from interface:DataCollectorReturn 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:
getPropertiesin interfaceDataCollector- Returns:
- consolidated property information
-
isApplet
public abstract boolean isApplet()
Description copied from interface:DataCollectorReturn true iff this DataCollector was created from applet data.- Specified by:
isAppletin 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)
-
-