org.cafesip.jiplet
Interface JipletContainerMBean

All Known Implementing Classes:
JipletContainer

public interface JipletContainerMBean

This interfaces is used to expose the JMX management interface for the jiplet container. The methods in this class are "exposed" to management applications using the JMX interface. Management applications can connect to the Jiplet container application and invoke the methods below to manage the contexts.

The jiplet applications can also expose their own management interfaces by registering with the MBeanServer created by the container.


Method Summary
 java.lang.String addContextMapping(java.lang.String context, java.lang.String mapping)
          This method adds a context mapping to the list of context mappings.
 java.lang.String createContext(java.lang.String path, java.lang.String overriddenName)
          Create a jiplet context.
 java.lang.String createRealm(java.lang.String path)
          Create a new realm.
 java.lang.String createRealmUser(java.lang.String name, java.lang.String user, java.lang.String password, java.lang.String[] roles)
          Create an user account for a given realm.
 java.lang.String deleteContext(java.lang.String name)
          Delete a context with a given name.
 java.lang.String deleteRealm(java.lang.String realmName)
          Delete an existing realm.
 java.lang.String deleteRealmUser(java.lang.String name, java.lang.String user)
          Delete an user account for a given realm
 org.cafesip.jiplet.jmxbeans.ConnectorElement getConnectorProperty(java.lang.String connectorName)
          Returns the property of a connector.
 org.cafesip.jiplet.jmxbeans.ContextElement getContextProperty(java.lang.String name)
          Return the property of a context specified by the name parameter.
 java.lang.String getDefaultConnectorName()
           
 java.lang.String getDeployDir()
          return the deploy directory
 java.lang.String getRealmDirName(java.lang.String realmName)
          Returns the realm deployment directory name.
 org.cafesip.jiplet.jmxbeans.RealmElement getRealmProperty(java.lang.String realmName)
          Returns the property of a realm.
 java.lang.String[] getRealmUser(java.lang.String name, java.lang.String user)
          Returns the user account information for a given realm.
 java.lang.String[] listConnectors()
          Return a list of deployed connectors.
 java.lang.String[] listContexts()
          Return a list of deployed contexts.
 java.lang.String[] listRealms()
          Returns a list of realms configured for the system.
 java.lang.String modifyRealmUser(java.lang.String name, java.lang.String user, java.lang.String password, java.lang.String[] roles)
          Modify an user account for a given realm.
 java.lang.String removeContextMapping(java.lang.String context)
          Removes the entry for the context from the context mapping.
 

Method Detail

getDeployDir

java.lang.String getDeployDir()
return the deploy directory

Returns:

getDefaultConnectorName

java.lang.String getDefaultConnectorName()
Returns:
the default connector name

createContext

java.lang.String createContext(java.lang.String path,
                               java.lang.String overriddenName)
Create a jiplet context.

Parameters:
path - full path name of the directory where a spr file or an exploded directory resides.
overriddenName - this is an optional parameter. If a non-null string is provided, the context name is set to this parameter. If null value is specified, the context is named based on the exploded directory name or the spr file name (the .spr extension is stripped).
Returns:
an empty string if the context was created successfully, an error message, otherwise.

deleteContext

java.lang.String deleteContext(java.lang.String name)
Delete a context with a given name.

Parameters:
name - name of the context.
Returns:
an empty string if the context was created successfully, an error message, otherwise.

listContexts

java.lang.String[] listContexts()
Return a list of deployed contexts.

Returns:

getContextProperty

org.cafesip.jiplet.jmxbeans.ContextElement getContextProperty(java.lang.String name)
Return the property of a context specified by the name parameter.

Parameters:
name - name of the context.
Returns:
null if the context is not found. Otherwise, it returns an object of type ContextElement that contains information on the context. @see org.cafesip.jiplet.jmxbeans.ContextElement for details.

listRealms

java.lang.String[] listRealms()
Returns a list of realms configured for the system.

Returns:

createRealmUser

java.lang.String createRealmUser(java.lang.String name,
                                 java.lang.String user,
                                 java.lang.String password,
                                 java.lang.String[] roles)
Create an user account for a given realm.

Parameters:
name - realm name
user - user name
password - password
roles - roles authorized for this user.
Returns:
an empty string if the operation was successful, an error message otherwise

modifyRealmUser

java.lang.String modifyRealmUser(java.lang.String name,
                                 java.lang.String user,
                                 java.lang.String password,
                                 java.lang.String[] roles)
Modify an user account for a given realm.

Parameters:
name - realm name
user - user name
password - password. If null, the password is not modified
roles - roles authorized for this user. If null, the roles are not modified.
Returns:
an empty string if the operation was successful, an error message otherwise

deleteRealmUser

java.lang.String deleteRealmUser(java.lang.String name,
                                 java.lang.String user)
Delete an user account for a given realm

Parameters:
name - realm name
user - user name
Returns:
an empty string if the operation was successful, an error message otherwise

getRealmUser

java.lang.String[] getRealmUser(java.lang.String name,
                                java.lang.String user)
Returns the user account information for a given realm. A null is returned if the user is not found.

Parameters:
name - realm name
user - user name

createRealm

java.lang.String createRealm(java.lang.String path)
Create a new realm.

Parameters:
path - path containing the exploded SRR entry or a SRR file.
Returns:
an empty string if the realm was created successfully, an error message otherwise.

deleteRealm

java.lang.String deleteRealm(java.lang.String realmName)
Delete an existing realm.

Parameters:
realmName - name of the realm
Returns:
an empty string if the realm was deleted successfully, an error message otherwise.

getRealmDirName

java.lang.String getRealmDirName(java.lang.String realmName)
Returns the realm deployment directory name.

Parameters:
realmName -
Returns:
the directory name for the realm. This method returns null if the realm is not found or if the realm is not a deplyed realm (was included in server.xml).

getRealmProperty

org.cafesip.jiplet.jmxbeans.RealmElement getRealmProperty(java.lang.String realmName)
Returns the property of a realm.

Parameters:
realmName -
Returns:
a RealmElement object, null if the realm was not found

addContextMapping

java.lang.String addContextMapping(java.lang.String context,
                                   java.lang.String mapping)
This method adds a context mapping to the list of context mappings. The jiplet container uses this context mapping for the context(s) instead of the context mappings specified in the jip.xml.

Parameters:
context - name of the context.
mapping - The mapping must be specified using the XML descriptor as described by $JIPLET_HOME/conf/context-mappings_x.y.xsd, where x.y is the current version of the descriptor file. For each context mapping, the context name and the connector name is mandatory.
Returns:
an empty string if the mapping was added successfully, an error message otherwise.

removeContextMapping

java.lang.String removeContextMapping(java.lang.String context)
Removes the entry for the context from the context mapping.

Parameters:
context - name of the context.
Returns:
an empty string if the mapping was removed successfully, an error message otherwise.

listConnectors

java.lang.String[] listConnectors()
Return a list of deployed connectors.

Returns:

getConnectorProperty

org.cafesip.jiplet.jmxbeans.ConnectorElement getConnectorProperty(java.lang.String connectorName)
Returns the property of a connector.

Parameters:
connectorName -
Returns:
a ConnectorElement object, null if the connector was not found


http://www.cafesip.org