org.jboss.ha.framework.server
Class FarmMemberService

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.deployment.scanner.AbstractDeploymentScanner (src) 
              extended byorg.jboss.deployment.scanner.URLDeploymentScanner (src) 
                  extended byorg.jboss.ha.framework.server.FarmMemberService
All Implemented Interfaces:
DeploymentScanner (src) , FarmMemberServiceMBean (src) , MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src)

public class FarmMemberService
extends URLDeploymentScanner (src)
implements FarmMemberServiceMBean (src)


Nested Class Summary
 
Nested classes inherited from class org.jboss.deployment.scanner.URLDeploymentScanner (src)
URLDeploymentScanner.DeployedURL (src)
 
Nested classes inherited from class org.jboss.deployment.scanner.AbstractDeploymentScanner (src)
AbstractDeploymentScanner.ScannerThread (src)
 
Nested classes inherited from class org.jboss.ha.framework.server.FarmMemberServiceMBean (src)
FarmMemberServiceMBean.FileContent (src)
 
Field Summary
protected  java.lang.String mBackgroundPartition
           
protected  ObjectName (src) mClusterPartitionName
           
protected  java.util.HashMap parentDUMap
           
protected  java.util.ArrayList remotelyDeployed
           
protected  java.util.ArrayList remotelyUndeployed
           
protected static java.lang.String SERVICE_NAME
           
 
Fields inherited from class org.jboss.deployment.scanner.URLDeploymentScanner (src)
deployedSet, doRecursiveSearch, filter, lastIncompleteDeploymentException, serverHome, serverHomeURL, sorter, urlList
 
Fields inherited from class org.jboss.deployment.scanner.AbstractDeploymentScanner (src)
deployer, mainDeployer, scanEnabled, scannerThread, scanPeriod
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.ha.framework.server.FarmMemberServiceMBean (src)
OBJECT_NAME
 
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
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(URLDeploymentScanner.DeployedURL (src)  du)
          A helper to deploy the given URL with the deployer.
 void farmDeploy(java.lang.String parentName, FarmMemberServiceMBean.FileContent (src)  file, java.util.Date date)
           
 java.util.HashMap farmDeployments()
           
 void farmUndeploy(java.lang.String parentName, java.lang.String fileName)
           
protected  java.io.File findParent(java.lang.String parentName)
           
 FarmMemberServiceMBean.FileContent (src) getFarmedDeployment(java.lang.String depName)
           
protected  FarmMemberServiceMBean.FileContent (src) getFileContent(java.io.File pFile)
           
 java.lang.String getName()
          Use the short class name as the default for the service name.
 java.lang.String getPartitionName()
          Name of the Partition used as a cluster definition for the farming
 ObjectName (src) preRegister(MBeanServer (src)  pServer, ObjectName (src)  pName)
          Saves the MBeanServer reference, create the Farm Member Name and add its Notification Listener to listen for Deployment / Undeployment notifications from the MainDeployer (src) .
protected  void pullNewDeployments(HAPartition (src)  partition, java.util.HashMap farmed)
           
 void setFarmDeployDirectory(java.lang.String urls)
          Deprecated.  
 void setPartitionName(java.lang.String pPartitionName)
           
 void setScannerName(java.lang.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(URLDeploymentScanner.DeployedURL (src)  du)
          A helper to undeploy the given URL from the deployer.
 
Methods inherited from class org.jboss.deployment.scanner.URLDeploymentScanner (src)
addURL, addURL, getFilter, getFilterInstance, getRecursiveSearch, getURLComparator, getURLList, hasURL, hasURL, isDeployed, makeURL, removeURL, removeURL, scan, setFilter, setFilterInstance, setRecursiveSearch, setURLComparator, setURLList, setURLs, updateSorter
 
Methods inherited from class org.jboss.deployment.scanner.AbstractDeploymentScanner (src)
destroyService, getDeployer, getScanPeriod, isScanEnabled, setDeployer, setScanEnabled, setScanPeriod, stopService
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, destroy, 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 (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.scanner.DeploymentScanner (src)
getDeployer, getScanPeriod, isScanEnabled, setDeployer, setScanEnabled, setScanPeriod
 
Methods inherited from interface org.jboss.system.Service (src)
create, destroy, start, stop
 

Field Detail

mClusterPartitionName

protected ObjectName (src)  mClusterPartitionName

mBackgroundPartition

protected java.lang.String mBackgroundPartition

SERVICE_NAME

protected static final java.lang.String SERVICE_NAME
See Also:
Constant Field Values (src)

parentDUMap

protected java.util.HashMap parentDUMap

remotelyDeployed

protected java.util.ArrayList remotelyDeployed

remotelyUndeployed

protected java.util.ArrayList remotelyUndeployed
Constructor Detail

FarmMemberService

public FarmMemberService()
Method Detail

getPartitionName

public java.lang.String getPartitionName()
Description copied from interface: FarmMemberServiceMBean (src)
Name of the Partition used as a cluster definition for the farming

Specified by:
getPartitionName in interface FarmMemberServiceMBean (src)

setPartitionName

public void setPartitionName(java.lang.String pPartitionName)
Specified by:
setPartitionName in interface FarmMemberServiceMBean (src)

setFarmDeployDirectory

public void setFarmDeployDirectory(java.lang.String urls)
                            throws java.net.MalformedURLException
Deprecated.  

Backward compatibility, mapped to the URLs attribute of URLDeploymentScannerMBean

Specified by:
setFarmDeployDirectory in interface FarmMemberServiceMBean (src)
Throws:
java.net.MalformedURLException

setScannerName

public void setScannerName(java.lang.String name)
Deprecated.  

Backward compatibility, but ignored as it does nothing.

Specified by:
setScannerName in interface FarmMemberServiceMBean (src)

getName

public java.lang.String getName()
Description copied from class: ServiceMBeanSupport (src)
Use the short class name as the default for the service name.

Specified by:
getName in interface ServiceMBean (src)
Overrides:
getName in class ServiceMBeanSupport (src)

preRegister

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

Specified by:
preRegister in interface MBeanRegistration (src)
Overrides:
preRegister in class URLDeploymentScanner (src)
Throws:
java.lang.Exception

createService

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

Overrides:
createService in class AbstractDeploymentScanner (src)
Throws:
java.lang.Exception

startService

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

Overrides:
startService in class AbstractDeploymentScanner (src)
Throws:
java.lang.Exception

pullNewDeployments

protected void pullNewDeployments(HAPartition (src)  partition,
                                  java.util.HashMap farmed)
                           throws java.lang.Exception
Throws:
java.lang.Exception

findParent

protected java.io.File findParent(java.lang.String parentName)

farmDeployments

public java.util.HashMap farmDeployments()

farmDeploy

public void farmDeploy(java.lang.String parentName,
                       FarmMemberServiceMBean.FileContent (src)  file,
                       java.util.Date date)

farmUndeploy

public void farmUndeploy(java.lang.String parentName,
                         java.lang.String fileName)

getFileContent

protected FarmMemberServiceMBean.FileContent (src)  getFileContent(java.io.File pFile)

getFarmedDeployment

public FarmMemberServiceMBean.FileContent (src)  getFarmedDeployment(java.lang.String depName)

deploy

protected void deploy(URLDeploymentScanner.DeployedURL (src)  du)
Description copied from class: URLDeploymentScanner (src)
A helper to deploy the given URL with the deployer.

Overrides:
deploy in class URLDeploymentScanner (src)

undeploy

protected void undeploy(URLDeploymentScanner.DeployedURL (src)  du)
Description copied from class: URLDeploymentScanner (src)
A helper to undeploy the given URL from the deployer.

Overrides:
undeploy in class URLDeploymentScanner (src)

createUnexistingLocalDir

protected void createUnexistingLocalDir()