|
||||||||||
| PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
org.jboss.system.ServiceMBeanSupport (src)
org.jboss.deployment.SubDeployerSupport
An abstract SubDeployer (src) .
Provides registration with MainDeployer (src) as well as
implementations of init, create, start, stop and destroy that
generate JMX notifications on completion of the method.
| Nested Class Summary | |
protected static class |
SubDeployerSupport.ClassConfiguration (src)
Static configuration properties for this class. |
| Field Summary | |
protected static SubDeployerSupport.ClassConfiguration (src) |
CONFIGURATION
The singleton class configuration object for this class. |
protected MainDeployerMBean |
mainDeployer
A proxy to the MainDeployer. |
protected static java.lang.String |
nativePrefix
Holds the native library prefix for this system. |
protected static java.lang.String |
nativeSuffix
Holds the native library suffix for this system. |
protected int |
relativeOrder
The relative order of the suffixes |
protected java.lang.String[] |
suffixes
The suffixes of interest to this subdeployer |
protected java.io.File |
tempDeployDir
The temporary directory into which deployments are unpacked |
| Fields inherited from class org.jboss.system.ServiceMBeanSupport (src) |
log, server, SERVICE_CONTROLLER_SIG, serviceName |
| Fields inherited from interface org.jboss.deployment.SubDeployer (src) |
CREATE_NOTIFICATION, DESTROY_NOTIFICATION, INIT_NOTIFICATION, RELATIVE_ORDER_100, RELATIVE_ORDER_200, RELATIVE_ORDER_300, RELATIVE_ORDER_400, RELATIVE_ORDER_500, RELATIVE_ORDER_600, RELATIVE_ORDER_700, RELATIVE_ORDER_800, RELATIVE_ORDER_900, START_NOTIFICATION, STOP_NOTIFICATION |
| Fields inherited from interface org.jboss.system.ServiceMBean (src) |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
| Constructor Summary | |
SubDeployerSupport()
|
|
| Method Summary | |
protected void |
addDeployableFiles(DeploymentInfo (src) di,
java.io.File dir)
This method recursively searches the directory structure for any files that are deployable (@see isDeployable). |
protected void |
addDeployableJar(DeploymentInfo (src) di,
java.util.jar.JarFile jarFile)
This method searches the entire jar file for any deployable files (@see isDeployable). |
void |
create(DeploymentInfo (src) di)
Sub-classes should override this method to provide custom 'create' logic. |
protected void |
createService()
The createService method is one of the ServiceMBean lifecyle operations. |
protected void |
deployUrl(DeploymentInfo (src) di,
java.net.URL url,
java.lang.String name)
|
void |
destroy(DeploymentInfo (src) di)
Sub-classes should override this method to provide custom 'destroy' logic. |
protected void |
destroyService()
Clean up. |
protected void |
emitNotification(java.lang.String type,
DeploymentInfo (src) di)
Simple helper to emit a subdeployer notification containing DeploymentInfo |
int |
getRelativeOrder()
Get the relative order of the specified suffixes |
java.lang.String[] |
getSuffixes()
Get an array of suffixes of interest to this subdeployer |
void |
init(DeploymentInfo (src) di)
Sub-classes should override this method to provide custom 'init' logic. |
protected boolean |
isDeployable(java.lang.String name,
java.net.URL url)
This method returns true if the name is a recognized archive file. |
protected void |
processNestedDeployments(DeploymentInfo (src) di)
The processNestedDeployments method searches for any nested and
deployable elements. |
void |
setRelativeOrder(int relativeOrder)
Set the relative order of the specified suffixes |
void |
setSuffixes(java.lang.String[] suffixes)
Set an array of suffixes of interest to this subdeployer |
void |
start(DeploymentInfo (src) di)
Sub-classes should override this method to provide custom 'start' logic. |
protected void |
startService()
Performs SubDeployer registration. |
void |
stop(DeploymentInfo (src) di)
Sub-classes should override this method to provide custom 'stop' logic. |
protected void |
stopService()
Performs SubDeployer deregistration. |
| Methods inherited from class org.jboss.system.ServiceMBeanSupport (src) |
create, destroy, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop |
| Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src) |
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jboss.deployment.SubDeployer (src) |
accepts, getServiceName |
| Field Detail |
protected static final java.lang.String nativeSuffix
Determined by examining the result of System.mapLibraryName(specialToken). The special token defaults to "XxX", but can be changed by setting the system property: org.jboss.deployment.SubDeployerSupport.nativeLibToken.
protected static final java.lang.String nativePrefix
nativeSuffixprotected MainDeployerMBean mainDeployer
protected java.io.File tempDeployDir
protected java.lang.String[] suffixes
protected int relativeOrder
protected static final SubDeployerSupport.ClassConfiguration (src) CONFIGURATION
| Constructor Detail |
public SubDeployerSupport()
| Method Detail |
protected void createService()
throws java.lang.Exception
createService method is one of the ServiceMBean lifecyle operations.
(no jmx tag needed from superinterface)
createService in class ServiceMBeanSupport (src) java.lang.Exception - if an error occurs
protected void startService()
throws java.lang.Exception
startService in class ServiceMBeanSupport (src) java.lang.Exception
protected void stopService()
throws java.lang.Exception
stopService in class ServiceMBeanSupport (src) java.lang.Exception
protected void destroyService()
throws java.lang.Exception
destroyService in class ServiceMBeanSupport (src) java.lang.Exceptionpublic java.lang.String[] getSuffixes()
getSuffixes in interface SubDeployer (src) public void setSuffixes(java.lang.String[] suffixes)
setSuffixes in interface SubDeployer (src) suffixes - array of suffix stringspublic int getRelativeOrder()
getRelativeOrder in interface SubDeployer (src) public void setRelativeOrder(int relativeOrder)
setRelativeOrder in interface SubDeployer (src) relativeOrder - the relative order of the specified suffixes
public void init(DeploymentInfo (src) di)
throws DeploymentException (src)
This method calls the processNestedDeployments(di) method and then issues a JMX notification of type SubDeployer.INIT_NOTIFICATION. This behaviour can overridden by concrete sub-classes. If further initialization needs to be done, and you wish to preserve the functionality, be sure to call super.init(di) at the end of your implementation.
init in interface SubDeployer (src) di - a DeploymentInfo value
DeploymentException (src) - if an error occurs
public void create(DeploymentInfo (src) di)
throws DeploymentException (src)
create in interface SubDeployer (src) di - a DeploymentInfo value
DeploymentException (src) - Failed to deploy
public void start(DeploymentInfo (src) di)
throws DeploymentException (src)
start in interface SubDeployer (src) di - a DeploymentInfo value
DeploymentException (src) - if an error occurs
public void stop(DeploymentInfo (src) di)
throws DeploymentException (src)
stop in interface SubDeployer (src) di - a DeploymentInfo value
DeploymentException (src) - if an error occurs
public void destroy(DeploymentInfo (src) di)
throws DeploymentException (src)
destroy in interface SubDeployer (src) di - a DeploymentInfo value
DeploymentException (src) - if an error occurs
protected void emitNotification(java.lang.String type,
DeploymentInfo (src) di)
protected void processNestedDeployments(DeploymentInfo (src) di)
throws DeploymentException (src)
processNestedDeployments method searches for any nested and
deployable elements. Only Directories and Zipped archives are processed,
and those are delegated to the addDeployableFiles and addDeployableJar
methods respectively. This method can be overridden for alternate
behaviour.
DeploymentException (src)
protected boolean isDeployable(java.lang.String name,
java.net.URL url)
name - The "short-name" of the URL. It will have any trailing '/'
characters removed, and any directory structure has been removed.url - The full url.
protected void addDeployableFiles(DeploymentInfo (src) di,
java.io.File dir)
throws DeploymentException (src)
di - the DeploymentInfodir - The root directory to start searching.
DeploymentException (src)
protected void addDeployableJar(DeploymentInfo (src) di,
java.util.jar.JarFile jarFile)
throws DeploymentException (src)
di - the DeploymentInfojarFile - the jar file to process.
DeploymentException (src)
protected void deployUrl(DeploymentInfo (src) di,
java.net.URL url,
java.lang.String name)
throws DeploymentException (src)
DeploymentException (src)
|
||||||||||
| PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||