public class NicFactory
extends java.lang.Object
NicFactory
is used to access all the NIC
components that are configured in the current gateway.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_PROXY_CLASS
The default NicProxy implementation classname
to be instantiated if no property is specified.
|
static java.lang.String |
NIC_PROXY_PROPERTY_NAME
The NicProxy classname property name
|
static java.lang.String |
PROXY_STUB_CLASS
The default NicProxy implementation classname
to be instantiated if no property is specified.
|
Modifier | Constructor and Description |
---|---|
protected |
NicFactory(java.util.Properties localProps)
Constructs NicFactory based on the privided properties.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Cleanup method
|
void |
destroyNicComponent(java.lang.String nicNamespace)
Destroys nic component based on its name space provided.
|
static NicFactory |
getInstance()
Returns the sole instance of the NicFactory.
|
NIC |
getNicComponent(java.lang.String nicNamespace,
net.juniper.smgt.lib.config.ConfigMgr confMgr)
Returns the NIC component that was configured
with the specified name space.
|
SaeLocator |
getSaeLocator(java.lang.String locName,
net.juniper.smgt.lib.config.ConfigMgr confMgr)
Returns the SaeLocator component that was configured
with the specified name.
|
static void |
initialize(boolean accessMode,
net.juniper.smgt.lib.config.ConfigMgr aMgr,
java.lang.String[] aArgs,
java.util.Properties props,
java.lang.String rootNS)
Initializes the sole instance of NicFactory using
ORB properties passed in, access mode for NicHost (true for stand alone
NicHost), ConfigManager instance, arguments to init ORB and NIC
root name space.
|
static void |
initialize(java.util.Properties props)
Initializes the sole instance of NicFactory using
ORB properties passed in.
|
static boolean |
isAccessMode()
Returns true if NicFactory is running in access mode
(local resolvers will be used in resolution process at NicHost)
|
static boolean |
isInitialized()
Checks if the factory has been previously initialized
|
static boolean |
isLocalMode()
Returns true if there is a local NIC host attached to this Nic Factory.
|
static void |
setConfigManager(net.juniper.smgt.lib.config.ConfigMgr aConfMan)
Associates the passed-in Config manager to the singelton instance
of the NicFactory.
|
static void |
setConfigManager(net.juniper.smgt.lib.config.ConfigMgr aConfMan,
java.lang.String nicRootNS)
Associates the passed-in Config manager to the singelton instance
of the NicFactory.
|
public static final java.lang.String PROXY_STUB_CLASS
public static final java.lang.String DEFAULT_PROXY_CLASS
public static final java.lang.String NIC_PROXY_PROPERTY_NAME
protected NicFactory(java.util.Properties localProps)
props
- Propertiespublic static NicFactory getInstance()
public static void setConfigManager(net.juniper.smgt.lib.config.ConfigMgr aConfMan)
aConfMan
- the application's configuration managerpublic static void setConfigManager(net.juniper.smgt.lib.config.ConfigMgr aConfMan, java.lang.String nicRootNS)
aConfMan
- the application's configuration managernicRootNS
- the namespace (relative to the root) where the NIC
local NIChost configuration can be foundpublic static void initialize(java.util.Properties props)
public static void initialize(boolean accessMode, net.juniper.smgt.lib.config.ConfigMgr aMgr, java.lang.String[] aArgs, java.util.Properties props, java.lang.String rootNS)
accessMode
- booleanaMgr
- ConfigMgraArgs
- String[]props
- PropertiesrootNS
- Stringpublic NIC getNicComponent(java.lang.String nicNamespace, net.juniper.smgt.lib.config.ConfigMgr confMgr) throws java.lang.IllegalArgumentException
nicNamespace
- String the name space of the required NIC componentconfMgr
- ConfigMgr configuration managerjava.lang.IllegalArgumentException
- runtime exception on
instantiation failure - thrown when nicNamespace is invalid or
directory connection is unavailable.public SaeLocator getSaeLocator(java.lang.String locName, net.juniper.smgt.lib.config.ConfigMgr confMgr) throws java.lang.IllegalArgumentException
locName
- the name of the required SaeLocator componentconfMgr
- configuration managerjava.lang.IllegalArgumentException
- if no SaeLocator component with the specified
name is found.public void destroy()
public void destroyNicComponent(java.lang.String nicNamespace)
nicNamespace
- java.lang.Stringpublic static boolean isAccessMode()
public static boolean isLocalMode()
public static boolean isInitialized()