org.apache.servicemix.jbi.deployer.task
Class JbiTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.servicemix.jbi.deployer.task.JbiTask
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
DeployServiceAssemblyTask, InstallComponentTask, InstallSharedLibraryTask, ListBindingComponentsTask, ListServiceAssembliesTask, ListServiceEnginesTask, ListSharedLibrariesTask, ShutDownComponentTask, ShutDownServiceAssemblyTask, StartComponentTask, StartServiceAssemblyTask, StopComponentTask, StopServiceAssemblyTask, UndeployServiceAssemblyTask, UninstallComponentTask, UninstallSharedLibraryTask

public abstract class JbiTask
extends org.apache.tools.ant.Task

A bean for connecting to a remote JMX MBeanServer

Version:
$Revision$

Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
JbiTask()
           
 
Method Summary
 void close()
          close any internal remote connections
 void connect()
          initialize the connection
protected abstract  void doExecute(AdminCommandsService acs)
           
 void execute()
          execute the task
 AdminCommandsService getAdminCommandsService()
          Get the AdminCommandsService
 String getContainerName()
           
 String getHost()
           
 JMXConnector getJMXConnector(JMXServiceURL url)
          Get a JMXConnector from a url
 String getJmxDomainName()
           
 String getJndiPath()
           
 String getNamingStrategy()
           
 String getPassword()
           
 int getPort()
           
 String getServerProtocol()
           
 JMXServiceURL getServiceURL()
          Get the JMXServiceURL - built from the protocol used and host names
 String getUsername()
           
 boolean isFailOnError()
           
 void setContainerName(String containerName)
           
 void setFailOnError(boolean failOnError)
           
 void setHost(String host)
           
 void setJmxDomainName(String jmxDomainName)
           
 void setJndiPath(String jndiPath)
           
 void setNamingStrategy(String namingStrategy)
           
 void setPassword(String password)
           
 void setPort(int port)
           
 void setServerProtocol(String serverProtocol)
           
 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
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JbiTask

public JbiTask()
Method Detail

getServiceURL

public JMXServiceURL getServiceURL()
                            throws MalformedURLException
Get the JMXServiceURL - built from the protocol used and host names

Returns:
the url
Throws:
MalformedURLException

getJMXConnector

public JMXConnector getJMXConnector(JMXServiceURL url)
                             throws IOException
Get a JMXConnector from a url

Parameters:
url -
Returns:
the JMXConnector
Throws:
IOException

connect

public void connect()
             throws IOException
initialize the connection

Throws:
org.apache.tools.ant.BuildException
IOException

close

public void close()
close any internal remote connections


getAdminCommandsService

public AdminCommandsService getAdminCommandsService()
                                             throws Exception
Get the AdminCommandsService

Returns:
the main administration service MBean
Throws:
Exception

getContainerName

public String getContainerName()
Returns:
Returns the containerName.

setContainerName

public void setContainerName(String containerName)
Parameters:
containerName - The containerName to set.

getJmxDomainName

public String getJmxDomainName()
Returns:
Returns the jmxDomainName.

setJmxDomainName

public void setJmxDomainName(String jmxDomainName)
Parameters:
jmxDomainName - The jmxDomainName to set.

getJndiPath

public String getJndiPath()
Returns:
Returns the jndiPath.

setJndiPath

public void setJndiPath(String jndiPath)
Parameters:
jndiPath - The jndiPath to set.

getHost

public String getHost()
Returns:
Returns the namingHost.

setHost

public void setHost(String host)
Parameters:
host - The namingHost to set.

getPort

public int getPort()
Returns:
Returns the namingPort.

setPort

public void setPort(int port)
Parameters:
port - The namingPort to set.

getServerProtocol

public String getServerProtocol()
Returns:
Returns the serverProtocol.

setServerProtocol

public void setServerProtocol(String serverProtocol)
Parameters:
serverProtocol - The serverProtocol to set.

getPassword

public String getPassword()
Returns:
Returns the passwd.

setPassword

public void setPassword(String password)
Parameters:
password - The passwd to set.

getUsername

public String getUsername()
Returns:
Returns the username.

setUsername

public void setUsername(String username)
Parameters:
username - The username to set.

isFailOnError

public boolean isFailOnError()
Returns:
Returns the failOnError.

setFailOnError

public void setFailOnError(boolean failOnError)
Parameters:
failOnError - The failOnError to set.

getNamingStrategy

public String getNamingStrategy()
Returns:
Returns the namingStrategy.

setNamingStrategy

public void setNamingStrategy(String namingStrategy)
Parameters:
strategy - The namingStrategy to set.

execute

public void execute()
             throws org.apache.tools.ant.BuildException
execute the task

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException

doExecute

protected abstract void doExecute(AdminCommandsService acs)
                           throws Exception
Throws:
Exception


Copyright © 2005-2012 FuseSource. All Rights Reserved.