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.Task
Base 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
trustedCertEntry
to 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
keyEntry
to 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 void
execute()
Execute the task, called by AntAlarmMBean
getAlarm()
Get a proxy to the Alarm MBean object on the Rhino node.protected static RhinoConnection
getClient()
Get the Rhino client connection.DeploymentMBean
getDeployment()
Get a proxy to the DeploymentMBean object on the Rhino node.boolean
getFailOnError()
LoggingManagementMBean
getLogging()
Get a proxy to the Logging Config Operations MBean object on the Rhino node.ProfileProvisioningMBean
getProfileProvisioning()
Get a proxy to the Profile Provisioning MBean object on the Rhino node.ResourceManagementMBean
getResourceManagement()
Get a proxy to the Resource Management MBean object on the Rhino node.RhinoHousekeepingMBean
getRhinoInspector()
Get a proxy to the Rhino Housekeeping MBean object on the Rhino node.String
getServerHost()
Get the host name of the Rhino node connected to.int
getServerPort()
Get the server-side port connected to.ServiceManagementMBean
getServiceManagement()
Get a proxy to the Service Management MBean object on the Rhino node.SleeManagementMBean
getSleeManagement()
Get a proxy to the SLEE Management MBean object on the Rhino node.TraceMBean
getTrace()
Get a proxy to the Trace MBean object on the Rhino node.UserTransactionManagementMBean
getUserTransactionManagement()
Get a proxy to the User Transaction MBean object on the Rhino node.void
logout()
Disconnect the client from Rhino.void
setFailOnError(boolean failOnError)
void
setHost(String host)
void
setKeyStore(File arg)
void
setKeyStorePass(String arg)
void
setPassword(String password)
void
setPort(int port)
void
setRmissl(File arg)
Deprecated.No longer used.void
setTrustStore(File arg)
void
setTrustStorePass(String arg)
void
setUsername(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.BuildException
Execute the task, called by Ant
- Overrides:
execute
in 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 thetrustStore
andkeyStore
attributes 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.
-
-