jrunx.cluster
Class ClusterDeployerService

jrunx.kernel.ServiceAdapter
  |
  +--jrunx.kernel.ServicePartition
        |
        +--jrunx.kernel.ConfigurableServicePartition
              |
              +--jrunx.cluster.ClusterDeployerService
All Implemented Interfaces:
ClusterDeployerServiceMBean, ConfigurableServicePartitionMBean, java.util.EventListener, Listener, PeerListener, javax.naming.Referenceable, java.io.Serializable, ServerEventListener, Service, ServiceMBean, ServicePartitionMBean

public class ClusterDeployerService
extends ConfigurableServicePartition
implements ClusterDeployerServiceMBean, Listener, PeerListener, ServerEventListener

Author:
Paul Reilly
See Also:
Serialized Form

Fields inherited from class jrunx.kernel.ServicePartition
sortedServices
 
Fields inherited from class jrunx.kernel.ServiceAdapter
DEFAULT_DEACTIVATED, DEFAULT_DOMAIN, DOMAIN_NAME_SEPARATOR, DOMAIN_NAME_SUFFIX, domainName, jndiBindable, LOGGER_CACHE_TIME, SCHEDULER_SERVICE, SECURITY_MANAGER, server, status, TRANSACTION_MANAGER
 
Fields inherited from interface jrunx.cluster.ClusterDeployerServiceMBean
OBJECT_NAME
 
Fields inherited from interface jrunx.kernel.Service
INITIALIZED, STARTED, STARTING, STOPPED, STOPPING, UNINITIALIZED
 
Constructor Summary
ClusterDeployerService()
           
 
Method Summary
 void deploy(java.net.URL url)
           
 void destroy()
          Every service is eventually destroyed.
 void fileAddedEvent(java.io.File file)
           
 void fileChangedEvent(java.io.File file)
           
 void fileRemovedEvent(java.io.File file)
           
 java.lang.String getContextRoot()
           
 java.lang.String getDeployDirectory()
           
 java.util.List getDeployed()
           
 java.util.Iterator getDeployerServices()
           
 long getPollFrequency()
           
 void handleEvent(ServerEvent event, java.lang.Object handback)
          Handle a server event
 void init()
          Not every service needs to init, implement it out of convenience.
 boolean isDeployed(java.net.URL url)
           
 boolean isHotDeploy()
           
 void peerAddedEvent(ClusterableService peer)
           
 void peerRemovedEvent(ClusterableService peer)
           
 void redeploy(java.net.URL url)
           
 void setContextRoot(java.lang.String contextRoot)
           
 void setDeployDirectory(java.lang.String deployDirectory)
           
 void setHotDeploy(boolean hotDeploy)
           
 void setPollFrequency(long seconds)
           
 void start()
          Every service other than mere data collections should start
 void stop()
          Every service other than mere data collections should stop
 void undeploy(java.net.URL url)
           
 
Methods inherited from class jrunx.kernel.ConfigurableServicePartition
destroyServices, initServices, loadAndInit, loadChildren, setChildElements, startServices, stopServices
 
Methods inherited from class jrunx.kernel.ServicePartition
addService, addService, getServices, invokeChain, iterator, removeService, removeService
 
Methods inherited from class jrunx.kernel.ServiceAdapter
bind, findObjectInstance, findObjectInstance, findObjectInstance, getBindToJNDI, getDeactivated, getDomainName, getDomainSearchPath, getJRunService, getLogger, getName, getParentService, getReference, getResourceManager, getServerName, getServerProperties, getStatus, invokeMethod, isInPartition, isPartition, lookup, postDeregister, postRegister, preDeregister, preRegister, requestServer, scheduleRunnable, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, toString, unbind, unscheduleRunnable, updateStatus
 
Methods inherited from interface jrunx.kernel.ConfigurableServicePartitionMBean
setChildElements
 
Methods inherited from interface jrunx.kernel.ServicePartitionMBean
addService, addService, iterator, removeService, removeService
 
Methods inherited from interface jrunx.kernel.ServiceMBean
bind, getBindToJNDI, getDeactivated, getDomainName, getJRunService, getLogger, getName, getParentService, getServerName, requestServer, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, unbind
 
Methods inherited from interface jrunx.kernel.Service
getStatus, updateStatus
 

Constructor Detail

ClusterDeployerService

public ClusterDeployerService()
Method Detail

deploy

public void deploy(java.net.URL url)
            throws DeploymentException
Specified by:
deploy in interface ClusterDeployerServiceMBean

destroy

public void destroy()
             throws java.lang.Exception
Description copied from class: ServiceAdapter
Every service is eventually destroyed. Convenience implementation.
Specified by:
destroy in interface Service
Overrides:
destroy in class ConfigurableServicePartition

fileAddedEvent

public void fileAddedEvent(java.io.File file)
Specified by:
fileAddedEvent in interface Listener

fileChangedEvent

public void fileChangedEvent(java.io.File file)
Specified by:
fileChangedEvent in interface Listener

fileRemovedEvent

public void fileRemovedEvent(java.io.File file)
Specified by:
fileRemovedEvent in interface Listener

getContextRoot

public java.lang.String getContextRoot()
Specified by:
getContextRoot in interface ClusterDeployerServiceMBean

getDeployDirectory

public java.lang.String getDeployDirectory()
Specified by:
getDeployDirectory in interface ClusterDeployerServiceMBean

getDeployed

public java.util.List getDeployed()

getDeployerServices

public java.util.Iterator getDeployerServices()
                                       throws javax.naming.NamingException,
                                              java.rmi.RemoteException

getPollFrequency

public long getPollFrequency()
Specified by:
getPollFrequency in interface ClusterDeployerServiceMBean

handleEvent

public void handleEvent(ServerEvent event,
                        java.lang.Object handback)
Description copied from interface: ServerEventListener
Handle a server event
Specified by:
handleEvent in interface ServerEventListener
Following copied from interface: jrunx.kernel.ServerEventListener
Parameters:
event - The server event
handback - The object handback supplied when the listener was registered

init

public void init()
          throws java.lang.Exception
Description copied from class: ServiceAdapter
Not every service needs to init, implement it out of convenience.
Specified by:
init in interface Service
Overrides:
init in class ConfigurableServicePartition

isDeployed

public boolean isDeployed(java.net.URL url)
Specified by:
isDeployed in interface ClusterDeployerServiceMBean

isHotDeploy

public boolean isHotDeploy()
Specified by:
isHotDeploy in interface ClusterDeployerServiceMBean

peerAddedEvent

public void peerAddedEvent(ClusterableService peer)
Specified by:
peerAddedEvent in interface PeerListener

peerRemovedEvent

public void peerRemovedEvent(ClusterableService peer)
Specified by:
peerRemovedEvent in interface PeerListener

redeploy

public void redeploy(java.net.URL url)
              throws DeploymentException
Specified by:
redeploy in interface ClusterDeployerServiceMBean

setContextRoot

public void setContextRoot(java.lang.String contextRoot)
Specified by:
setContextRoot in interface ClusterDeployerServiceMBean

setDeployDirectory

public void setDeployDirectory(java.lang.String deployDirectory)
Specified by:
setDeployDirectory in interface ClusterDeployerServiceMBean

setHotDeploy

public void setHotDeploy(boolean hotDeploy)
Specified by:
setHotDeploy in interface ClusterDeployerServiceMBean

setPollFrequency

public void setPollFrequency(long seconds)
Specified by:
setPollFrequency in interface ClusterDeployerServiceMBean

start

public void start()
           throws java.lang.Exception
Description copied from class: ServiceAdapter
Every service other than mere data collections should start
Specified by:
start in interface Service
Overrides:
start in class ConfigurableServicePartition

stop

public void stop()
          throws java.lang.Exception
Description copied from class: ServiceAdapter
Every service other than mere data collections should stop
Specified by:
stop in interface Service
Overrides:
stop in class ConfigurableServicePartition

undeploy

public void undeploy(java.net.URL url)
              throws DeploymentException
Specified by:
undeploy in interface ClusterDeployerServiceMBean


Copyright � 2002 Macromedia Corporation. All Rights Reserved.