public class MyTask extends BaseAntTask {
public void execute() throws BuildException {
// execute standard login behaviour
super.execute();
RhinoConnection client = getClient();
// do something with the connection
}
}
Class BaseAntTask
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.Task
-
- com.opencloud.slee.mlet.ant.BaseAntTask
-
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
RhinoManagementAntTask
public class BaseAntTask extends org.apache.tools.ant.TaskBase Rhino management Ant task. Responsible for basic Rhino connection establishment behaviour.
This task can be extended and used to produce an Ant task to perform any management operation supported by Rhino. In skeletal form, such a task would look like this:
Ant Parameters Attribute Description Required host
Host name or IP address of Rhino node to connect to.
Yes.
port
RMI registry port configured for the JMX Remote M-Let on the Rhino node being connected to.
Yes.
username
Name of user to connect as.
Yes.
password
User’s password.
Yes.
trustStore
Path to key store file that contains a
trustedCertEntryto verify the identity of the Rhino node being connected to.Yes.
trustStorePass
Password for accessing the trust store.
Yes.
keyStore
Path to key store file that contains a
keyEntryto send to the Rhino node for it to verify the identity of this client.Yes.
keyStorePass
Password for accessing the key store.
Yes.
failonerror
Set the default failure behaviour. Subclasses define the exact use of this attribute.
No. Default value is 'false'.
-
-
Constructor Summary
Constructors Constructor Description BaseAntTask()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidexecute()Execute the task, called by AntAlarmMBeangetAlarm()Get a proxy to the Alarm MBean object on the Rhino node.protected static RhinoConnectiongetClient()Get the Rhino client connection.DeploymentMBeangetDeployment()Get a proxy to the DeploymentMBean object on the Rhino node.booleangetFailOnError()LoggingManagementMBeangetLogging()Get a proxy to the Logging Config Operations MBean object on the Rhino node.ProfileProvisioningMBeangetProfileProvisioning()Get a proxy to the Profile Provisioning MBean object on the Rhino node.ResourceManagementMBeangetResourceManagement()Get a proxy to the Resource Management MBean object on the Rhino node.RhinoHousekeepingMBeangetRhinoInspector()Get a proxy to the Rhino Housekeeping MBean object on the Rhino node.StringgetServerHost()Get the host name of the Rhino node connected to.intgetServerPort()Get the server-side port connected to.ServiceManagementMBeangetServiceManagement()Get a proxy to the Service Management MBean object on the Rhino node.SleeManagementMBeangetSleeManagement()Get a proxy to the SLEE Management MBean object on the Rhino node.TraceMBeangetTrace()Get a proxy to the Trace MBean object on the Rhino node.UserTransactionManagementMBeangetUserTransactionManagement()Get a proxy to the User Transaction MBean object on the Rhino node.voidlogout()Disconnect the client from Rhino.voidsetFailOnError(boolean failOnError)voidsetHost(String host)voidsetKeyStore(File arg)voidsetKeyStorePass(String arg)voidsetPassword(String password)voidsetPort(int port)voidsetRmissl(File arg)Deprecated.No longer used.voidsetTrustStore(File arg)voidsetTrustStorePass(String arg)voidsetUsername(String username)-
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
-
-
-
-
Method Detail
-
execute
public void execute() throws org.apache.tools.ant.BuildExceptionExecute the task, called by Ant
- Overrides:
executein classorg.apache.tools.ant.Task- Throws:
org.apache.tools.ant.BuildException
-
setHost
public void setHost(String host)
-
setPort
public void setPort(int port)
-
setUsername
public void setUsername(String username)
-
setPassword
public void setPassword(String password)
-
setRmissl
@Deprecated public void setRmissl(File arg)
Deprecated.No longer used. Use thetrustStoreandkeyStoreattributes instead.
-
setTrustStore
public void setTrustStore(File arg)
-
setTrustStorePass
public void setTrustStorePass(String arg)
-
setKeyStore
public void setKeyStore(File arg)
-
setKeyStorePass
public void setKeyStorePass(String arg)
-
getFailOnError
public boolean getFailOnError()
-
setFailOnError
public void setFailOnError(boolean failOnError)
-
getClient
protected static RhinoConnection getClient()
Get the Rhino client connection.
- Returns:
- the Rhino client connection.
-
getServerHost
public String getServerHost()
Get the host name of the Rhino node connected to.
- Returns:
getClient().getServerHost()
-
getServerPort
public int getServerPort()
Get the server-side port connected to.
- Returns:
getClient().getServerPort()
-
getDeployment
public DeploymentMBean getDeployment()
Get a proxy to the DeploymentMBean object on the Rhino node.
-
getLogging
public LoggingManagementMBean getLogging()
Get a proxy to the Logging Config Operations MBean object on the Rhino node.
-
getProfileProvisioning
public ProfileProvisioningMBean getProfileProvisioning()
Get a proxy to the Profile Provisioning MBean object on the Rhino node.
-
getResourceManagement
public ResourceManagementMBean getResourceManagement()
Get a proxy to the Resource Management MBean object on the Rhino node.
-
getRhinoInspector
public RhinoHousekeepingMBean getRhinoInspector()
Get a proxy to the Rhino Housekeeping MBean object on the Rhino node.
-
getServiceManagement
public ServiceManagementMBean getServiceManagement()
Get a proxy to the Service Management MBean object on the Rhino node.
-
getSleeManagement
public SleeManagementMBean getSleeManagement()
Get a proxy to the SLEE Management MBean object on the Rhino node.
-
getTrace
public TraceMBean getTrace()
Get a proxy to the Trace MBean object on the Rhino node.
-
getAlarm
public AlarmMBean getAlarm()
Get a proxy to the Alarm MBean object on the Rhino node.
-
getUserTransactionManagement
public UserTransactionManagementMBean getUserTransactionManagement()
Get a proxy to the User Transaction MBean object on the Rhino node.
-
-