org.jboss.ha.framework.server
Class FarmMemberService

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.deployment.scanner.AbstractDeploymentScanner
              extended by org.jboss.deployment.scanner.URLDeploymentScanner
                  extended by org.jboss.ha.framework.server.FarmMemberService
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.deployment.scanner.DeploymentScanner, org.jboss.deployment.scanner.DeploymentScannerMBean, org.jboss.deployment.scanner.URLDeploymentScannerMBean, FarmMemberServiceMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class FarmMemberService
extends org.jboss.deployment.scanner.URLDeploymentScanner
implements FarmMemberServiceMBean

Version:
$Revision: 1.16.4.9 $

20021014 andreas schaefer:

20020809 bill burke:

Author:
Andreas Schaefer, Bill Burke

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.deployment.scanner.URLDeploymentScanner
org.jboss.deployment.scanner.URLDeploymentScanner.DeployedURL
 
Nested classes/interfaces inherited from class org.jboss.deployment.scanner.AbstractDeploymentScanner
org.jboss.deployment.scanner.AbstractDeploymentScanner.ScannerThread
 
Field Summary
protected  String mBackgroundPartition
           
protected  ClusterPartitionMBean mClusterPartition
           
protected  javax.management.ObjectName mClusterPartitionName
           
protected  HashMap parentDUMap
           
protected  ArrayList remotelyDeployed
           
protected  ArrayList remotelyUndeployed
           
protected static String SERVICE_NAME
           
 
Fields inherited from class org.jboss.deployment.scanner.URLDeploymentScanner
deployedSet, doRecursiveSearch, filter, lastIncompleteDeploymentException, listerFactory, serverHome, serverHomeURL, skipSet, sorter, urlList
 
Fields inherited from class org.jboss.deployment.scanner.AbstractDeploymentScanner
deployer, mainDeployer, scanEnabled, scannerThread, scanPeriod, stopTimeOut
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.ha.framework.server.FarmMemberServiceMBean
OBJECT_NAME
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
FarmMemberService()
           
 
Method Summary
protected  void createService()
          Looks up the Server Config instance to figure out the temp-directory and the farm-deploy-directory
protected  void createUnexistingLocalDir()
           
protected  void deploy(org.jboss.deployment.scanner.URLDeploymentScanner.DeployedURL du)
           
 void farmDeploy(String parentName, File destFile, Date date)
           
 HashMap farmDeployments()
           
 void farmUndeploy(String parentName, String fileName)
           
protected  File findParent(String parentName)
           
 ClusterPartitionMBean getClusterPartition()
          Get the underlying partition used by this service.
 String getName()
           
 String getPartitionName()
          Gets the name of the HAPartition used by this service.
 javax.management.ObjectName preRegister(javax.management.MBeanServer pServer, javax.management.ObjectName pName)
          Saves the MBeanServer reference, create the Farm Member Name and add its Notification Listener to listen for Deployment / Undeployment notifications from the MainDeployer.
protected  void pullNewDeployments(HAPartition partition, HashMap farmed)
           
 void setClusterPartition(ClusterPartitionMBean clusterPartition)
          Sets the underlying partition used by this service.
 void setFarmDeployDirectory(String urls)
          Deprecated.  
 void setPartitionName(String pPartitionName)
          Sets the name of the HAPartition used by this service.
 void setScannerName(String name)
          Deprecated.  
protected  void startService()
          Register itself as RPC-Handler to the HA-Partition and add the farm deployment directory to the scanner
protected  void undeploy(org.jboss.deployment.scanner.URLDeploymentScanner.DeployedURL du)
           
 
Methods inherited from class org.jboss.deployment.scanner.URLDeploymentScanner
addURL, addURL, getFilter, getFilterInstance, getRecursiveSearch, getURLComparator, getURLList, hasURL, hasURL, isDeployed, listDeployedURLs, makeURL, removeURL, removeURL, resumeDeployment, scan, setFilter, setFilterInstance, setRecursiveSearch, setURLComparator, setURLList, setURLs, suspendDeployment, updateSorter
 
Methods inherited from class org.jboss.deployment.scanner.AbstractDeploymentScanner
destroyService, getDeployer, getScanPeriod, getStopTimeOut, isScanEnabled, setDeployer, setScanEnabled, setScanPeriod, setStopTimeOut, stopService
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, destroy, getDeploymentInfo, getLog, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, 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.scanner.URLDeploymentScannerMBean
addURL, addURL, getFilter, getFilterInstance, getRecursiveSearch, getURLComparator, getURLList, hasURL, hasURL, listDeployedURLs, removeURL, removeURL, resumeDeployment, setFilter, setFilterInstance, setRecursiveSearch, setURLComparator, setURLList, setURLs, suspendDeployment
 
Methods inherited from interface org.jboss.deployment.scanner.DeploymentScannerMBean
getDeployer, getStopTimeOut, isScanEnabled, scan, setDeployer, setScanEnabled, setScanPeriod, setStopTimeOut
 
Methods inherited from interface org.jboss.system.ServiceMBean
getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 
Methods inherited from interface org.jboss.deployment.scanner.DeploymentScanner
getDeployer, getScanPeriod, isScanEnabled, setDeployer, setScanEnabled, setScanPeriod
 

Field Detail

mClusterPartitionName

protected javax.management.ObjectName mClusterPartitionName

mClusterPartition

protected ClusterPartitionMBean mClusterPartition

mBackgroundPartition

protected String mBackgroundPartition

SERVICE_NAME

protected static final String SERVICE_NAME
See Also:
Constant Field Values

parentDUMap

protected HashMap parentDUMap

remotelyDeployed

protected ArrayList remotelyDeployed

remotelyUndeployed

protected ArrayList remotelyUndeployed
Constructor Detail

FarmMemberService

public FarmMemberService()
Method Detail

getPartitionName

public String getPartitionName()
Description copied from interface: FarmMemberServiceMBean
Gets the name of the HAPartition used by this service.

Specified by:
getPartitionName in interface FarmMemberServiceMBean
Returns:
the name of the partition

setPartitionName

public void setPartitionName(String pPartitionName)
Description copied from interface: FarmMemberServiceMBean
Sets the name of the HAPartition used by this service. Can be set only when the MBean is not in a STARTED or STARTING state.

Specified by:
setPartitionName in interface FarmMemberServiceMBean
Parameters:
pPartitionName - the name of the partition

getClusterPartition

public ClusterPartitionMBean getClusterPartition()
Description copied from interface: FarmMemberServiceMBean
Get the underlying partition used by this service.

Specified by:
getClusterPartition in interface FarmMemberServiceMBean
Returns:
the partition

setClusterPartition

public void setClusterPartition(ClusterPartitionMBean clusterPartition)
Description copied from interface: FarmMemberServiceMBean
Sets the underlying partition used by this service. Can be set only when the MBean is not in a STARTED or STARTING state.

Specified by:
setClusterPartition in interface FarmMemberServiceMBean
Parameters:
clusterPartition - the partition

setFarmDeployDirectory

public void setFarmDeployDirectory(String urls)
                            throws MalformedURLException
Deprecated. 

Backward compatibility, mapped to the URLs attribute of URLDeploymentScannerMBean

Specified by:
setFarmDeployDirectory in interface FarmMemberServiceMBean
Throws:
MalformedURLException

setScannerName

public void setScannerName(String name)
Deprecated. 

Backward compatibility, but ignored as it does nothing.

Specified by:
setScannerName in interface FarmMemberServiceMBean

getName

public String getName()
Specified by:
getName in interface org.jboss.system.ServiceMBean
Overrides:
getName in class org.jboss.system.ServiceMBeanSupport

preRegister

public javax.management.ObjectName preRegister(javax.management.MBeanServer pServer,
                                               javax.management.ObjectName pName)
                                        throws Exception
Saves the MBeanServer reference, create the Farm Member Name and add its Notification Listener to listen for Deployment / Undeployment notifications from the MainDeployer.

Specified by:
preRegister in interface javax.management.MBeanRegistration
Overrides:
preRegister in class org.jboss.deployment.scanner.URLDeploymentScanner
Throws:
Exception

createService

protected void createService()
                      throws Exception
Looks up the Server Config instance to figure out the temp-directory and the farm-deploy-directory

Overrides:
createService in class org.jboss.deployment.scanner.URLDeploymentScanner
Throws:
Exception

startService

protected void startService()
                     throws Exception
Register itself as RPC-Handler to the HA-Partition and add the farm deployment directory to the scanner

Overrides:
startService in class org.jboss.deployment.scanner.AbstractDeploymentScanner
Throws:
Exception

pullNewDeployments

protected void pullNewDeployments(HAPartition partition,
                                  HashMap farmed)

findParent

protected File findParent(String parentName)

farmDeployments

public HashMap farmDeployments()

farmDeploy

public void farmDeploy(String parentName,
                       File destFile,
                       Date date)

farmUndeploy

public void farmUndeploy(String parentName,
                         String fileName)

deploy

protected void deploy(org.jboss.deployment.scanner.URLDeploymentScanner.DeployedURL du)
Overrides:
deploy in class org.jboss.deployment.scanner.URLDeploymentScanner

undeploy

protected void undeploy(org.jboss.deployment.scanner.URLDeploymentScanner.DeployedURL du)
Overrides:
undeploy in class org.jboss.deployment.scanner.URLDeploymentScanner

createUnexistingLocalDir

protected void createUnexistingLocalDir()


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.