FileDocCategorySizeDatePackage
ManagedORBListener.javaAPI DocGlassfish v2 API7799Fri May 04 22:33:56 BST 2007com.sun.enterprise.admin.server.core.mbean.config

ManagedORBListener

public class ManagedORBListener extends ConfigMBeanBase implements ConfigAttributeName.ORBListener
This Config MBean represents a ORB Listener. It extends ConfigMBeanBase class which provides get/set attribute(s) and getMBeanInfo services according to text descriptions. ObjectName of this MBean is: ias: type=orblistener, instance-name=, name=

Fields Summary
private static final String[]
MAPLIST
MAPLIST array defines mapping between "external" name and its location in XML relatively base node
private static final String[]
ATTRIBUTES
ATTRIBUTES array specifies attributes descriptions in format defined for MBeanEasyConfig
private static final String[]
OPERATIONS
OPERATIONS array specifies operations descriptions in format defined for MBeanEasyConfig
private static com.sun.enterprise.util.i18n.StringManager
localStrings
Constructors Summary
public ManagedORBListener()
Default constructor sets MBean description tables

    
                     
       
    
        Object[] mergedAttrs = MergeAttributesWithAnotherMbean(
             MAPLIST, ATTRIBUTES, SslBase.MAPLIST, SslBase.ATTRIBUTES,
             ServerTags.SSL , null);
        this.setDescriptions((String[][])mergedAttrs[0], (String[])mergedAttrs[1], OPERATIONS);
    
public ManagedORBListener(String instanceName, String listenerId)
Constructs Config MBean for ORB Listener.

param
instanceName The server instance name.
param
listenerId Listener id for given resource

        this(); //set description tables
        initialize(ObjectNames.kOrbListenerType, new String[]{instanceName, listenerId});
    
Methods Summary
public voidcreateSsl(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.

        IiopListener listener = (IiopListener)getConfigBeanByXPath( getBasePath() );
        try
        {
            if(listener.getSsl()!=null)
            {
                listener = null;
				String msg = localStrings.getString( "admin.server.core.mbean.config.orblistener_has_ssl_created" );
                throw new ConfigException( msg );
            }
        }
        catch (ConfigException e)
        {
            if(listener==null)
                throw e;
        }
        
        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());
        
        listener.setSsl(ssl);
        
        getConfigContext().flush();
    
public voiddeleteSsl()
This operation deletes Ssl sub-element from current element;

        IiopListener listener = (IiopListener)getConfigBeanByXPath( getBasePath() );
        listener.setSsl(null);
        
        getConfigContext().flush();
    
public booleanisSslCreated()
This operation checks Ssl existance in current element;

        IiopListener listener = (IiopListener)getConfigBeanByXPath( getBasePath() );
        return (listener.getSsl()!=null);