站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 cluster API Documentation 英文版文档

FarmMemberService (JBoss Cluster API) - JBoss 4.0.1 sp1 cluster API Documentation 英文版文档


org.jboss.ha.framework.server
Class FarmMemberService

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

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

Version:
$Revision: 1.16 $

20021014 andreas schaefer:

  • Initial import

20020809 bill burke:

  • Rewrote as a Scanner instead. Also on boot-up asks cluster for deployable files
Author:
Andreas Schaefer, Bill Burke

Nested Class Summary
 
Nested classes inherited from class org.jboss.deployment.scanner.URLDeploymentScanner
org.jboss.deployment.scanner.URLDeploymentScanner.DeployedURL
 
Nested classes inherited from class org.jboss.deployment.scanner.AbstractDeploymentScanner
org.jboss.deployment.scanner.AbstractDeploymentScanner.ScannerThread
 
Nested classes inherited from class org.jboss.ha.framework.server.FarmMemberServiceMBean
FarmMemberServiceMBean.FileContent
 
Field Summary
protected  String mBackgroundPartition
           
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, serverHome, serverHomeURL, sorter, urlList
 
Fields inherited from class org.jboss.deployment.scanner.AbstractDeploymentScanner
deployer, mainDeployer, scanEnabled, scannerThread, scanPeriod
 
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, FarmMemberServiceMBean.FileContent file, Date date)
           
 HashMap farmDeployments()
           
 void farmUndeploy(String parentName, String fileName)
           
protected  File findParent(String parentName)
           
 FarmMemberServiceMBean.FileContent getFarmedDeployment(String depName)
           
protected  FarmMemberServiceMBean.FileContent getFileContent(File pFile)
           
 String getName()
           
 String getPartitionName()
          Name of the Partition used as a cluster definition for the farming
 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 setFarmDeployDirectory(String urls)
          Deprecated.  
 void setPartitionName(String pPartitionName)
           
 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, getRecursiveSearch, getURLComparator, getURLList, hasURL, hasURL, isDeployed, makeURL, removeURL, removeURL, scan, setFilter, setRecursiveSearch, setURLComparator, setURLList, setURLs, updateSorter
 
Methods inherited from class org.jboss.deployment.scanner.AbstractDeploymentScanner
destroyService, getDeployer, getScanPeriod, isScanEnabled, setDeployer, setScanEnabled, setScanPeriod, stopService
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
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
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.URLDeploymentScannerMBean
addURL, addURL, getFilter, getRecursiveSearch, getURLComparator, getURLList, hasURL, hasURL, removeURL, removeURL, scan, setFilter, setRecursiveSearch, setURLComparator, setURLList, setURLs
 
Methods inherited from interface org.jboss.deployment.scanner.DeploymentScannerMBean
getDeployer, isScanEnabled, setDeployer, setScanEnabled, setScanPeriod
 
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

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
Name of the Partition used as a cluster definition for the farming

Specified by:
getPartitionName in interface FarmMemberServiceMBean

setPartitionName

public void setPartitionName(String pPartitionName)
Specified by:
setPartitionName in interface FarmMemberServiceMBean

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

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
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

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

Throws:
Exception

pullNewDeployments

protected void pullNewDeployments(HAPartition partition,
                                  HashMap farmed)
                           throws Exception
Throws:
Exception

findParent

protected File findParent(String parentName)

farmDeployments

public HashMap farmDeployments()

farmDeploy

public void farmDeploy(String parentName,
                       FarmMemberServiceMBean.FileContent file,
                       Date date)

farmUndeploy

public void farmUndeploy(String parentName,
                         String fileName)

getFileContent

protected FarmMemberServiceMBean.FileContent getFileContent(File pFile)

getFarmedDeployment

public FarmMemberServiceMBean.FileContent getFarmedDeployment(String depName)

deploy

protected void deploy(org.jboss.deployment.scanner.URLDeploymentScanner.DeployedURL du)

undeploy

protected void undeploy(org.jboss.deployment.scanner.URLDeploymentScanner.DeployedURL du)

createUnexistingLocalDir

protected void createUnexistingLocalDir()


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