ManagedORBComponentpublic class ManagedORBComponent extends ConfigMBeanBase implements ConfigAttributeName.OrbComponentThis Config MBean represents a ORB Component.
It extends ConfigMBeanBase class which provides get/set attribute(s) and getMBeanInfo services according to text descriptions.
ObjectName of this MBean is:
ias: type=orb, instance-name= |
Fields Summary |
---|
private static com.sun.enterprise.util.i18n.StringManager | localStrings | private static final String | ORB_ATTRIBUTE | private static final String[] | MAPLISTMAPLIST array defines mapping between "external" name and its location in XML relatively base node | private static final String[] | ATTRIBUTESATTRIBUTES array specifies attributes descriptions in format defined for MBeanEasyConfig | private static final String[] | OPERATIONSOPERATIONS array specifies operations descriptions in format defined for MBeanEasyConfig |
Constructors Summary |
---|
public ManagedORBComponent()Default constructor sets MBean description tables
Object[] mergedAttrs = MergeAttributesWithAnotherMbean(
MAPLIST, ATTRIBUTES, SslBase.MAPLIST, SslBase.ATTRIBUTES,
ServerTags.SSL_CLIENT_CONFIG+ServerXPathHelper.XPATH_SEPARATOR+ServerTags.SSL , null);
this.setDescriptions( (String[][])mergedAttrs[0], (String[])mergedAttrs[1], OPERATIONS);
| public ManagedORBComponent(String instanceName)Constructs Config MBean for ORB Component.
this(); //set description tables
initialize(ObjectNames.kOrbType, new String[]{instanceName});
|
Methods Summary |
---|
public void | createORBListener(java.lang.String id, java.lang.String address, java.lang.Integer port, java.lang.Boolean enabled)This operation creates OrbListener according to attributes and adds(links) it to current ORB;
If attribute is 'null' then default value will be set.
IiopListener listener = new IiopListener();
if(id!=null)
listener.setId(id);
if(address!=null)
listener.setAddress(address);
if(port!=null)
listener.setPort(port.toString());
if(enabled!=null)
listener.setEnabled(enabled.booleanValue());
IiopService service = (IiopService)getConfigBeanByXPath( ServerXPathHelper.getIIOPServiceXpath() );
service.addIiopListener(listener);
getConfigContext().flush();
| public void | createSsl(java.lang.String certNickname, java.lang.Boolean ssl2Enabled, java.lang.String ssl2Ciphers, java.lang.Boolean ssl3Enabled, java.lang.String ssl3TlsCiphers, java.lang.Boolean tlsEnabled, java.lang.Boolean tlsRollbackEnabled, java.lang.Boolean clientAuthEnabled)This operation creates Ssl ConfigBean according to attributes and adds(links) it to current config bean;
If attribute is 'null' then default value will be set.
if(isSslCreated())
{
String msg = localStrings.getString( "admin.server.core.mbean.config.iiopservice_has_ssl_created" );
throw new ConfigException( msg );
}
IiopService service = (IiopService)this.getBaseConfigBean();
SslClientConfig config = service.getSslClientConfig();
if(config == null)
{
config = new SslClientConfig();
}
Ssl ssl = new Ssl();
//strings
if(certNickname!=null)
ssl.setCertNickname(certNickname);
if(ssl2Ciphers!=null)
ssl.setSsl2Ciphers(ssl2Ciphers);
if(ssl3TlsCiphers!=null)
ssl.setSsl3TlsCiphers(ssl3TlsCiphers);
//Booleans
if(ssl2Enabled!=null)
ssl.setSsl2Enabled(ssl2Enabled.booleanValue());
if(ssl3Enabled!=null)
ssl.setSsl3Enabled(ssl3Enabled.booleanValue());
if(tlsEnabled!=null)
ssl.setTlsEnabled(tlsEnabled.booleanValue());
if(tlsRollbackEnabled!=null)
ssl.setTlsRollbackEnabled(tlsRollbackEnabled.booleanValue());
if(clientAuthEnabled!=null)
ssl.setClientAuthEnabled(clientAuthEnabled.booleanValue());
config.setSsl(ssl);
service.setSslClientConfig(config);
getConfigContext().flush();
| public void | deleteORBListener(java.lang.String id)This operation deletes OrbListener according to id if it connected to current ORB.
IiopService service = (IiopService)getConfigBeanByXPath( ServerXPathHelper.getIIOPServiceXpath() );
IiopListener listener = service.getIiopListenerById(id);
if(listener!=null)
service.removeIiopListener(listener);
getConfigContext().flush();
| public void | deleteSsl()This operation deletes Ssl sub-element from current element;
IiopService service = (IiopService)this.getBaseConfigBean();
service.setSslClientConfig(null); //because ssl is required and only element in config now
getConfigContext().flush();
| public boolean | isSslCreated()This operation checks Ssl existance in current element;
IiopService service = (IiopService)this.getBaseConfigBean();
SslClientConfig config = service.getSslClientConfig();
if(config==null)
return false;
return (config.getSsl()!=null);
| public java.lang.String[] | listORBListeners()This operation returns list of OrbListener's ids connected to current ORB.
IiopService service = (IiopService)getConfigBeanByXPath( ServerXPathHelper.getIIOPServiceXpath() );
IiopListener[] listeners = service.getIiopListener();
String[] res = new String[listeners.length];
for(int i=0; i<listeners.length; i++)
{
res[i] = listeners[i].getId();
}
return res;
|
|