站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.4 API 英文版文档

HASingletonInvoker - JBOSS Portal 2.4 API 英文版文档


org.jboss.portal.jems.ha
Class HASingletonInvoker

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended byorg.jboss.system.ServiceMBeanSupport
          extended byorg.jboss.ha.jmx.HAServiceMBeanSupport
              extended byorg.jboss.ha.singleton.HASingletonSupport
                  extended byorg.jboss.portal.jems.ha.HASingletonInvoker
All Implemented Interfaces:
org.jboss.ha.jmx.HAServiceMBean, org.jboss.ha.singleton.HASingleton, HASingletonInvokerMBean, org.jboss.ha.singleton.HASingletonMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class HASingletonInvoker
extends org.jboss.ha.singleton.HASingletonSupport
implements HASingletonInvokerMBean


Nested Class Summary
 
Nested classes inherited from class org.jboss.portal.jems.ha.HASingletonInvokerMBean
HASingletonInvokerMBean.Callback, HASingletonInvokerMBean.Proxy
 
Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
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
HASingletonInvoker()
           
 
Method Summary
 HASingletonInvokerMBean.Callback getCallback()
          Get the callback of the invoker.
 java.lang.String getJNDIName()
          Return the JNDI name under which the proxy is bound.
 java.util.Properties getJNDIProperties()
          Return the JNDI configuration to lookup the proxy.
 int getMaxRetries()
          Return the max number of retries when an invocation is done.
 javax.management.ObjectName getProxyFactory()
          Return the name of the proxy factory to use.
 long getRetryWaitingTimeMS()
          Return the time that the thread will sleep before looking up a proxy during fail over.
 java.lang.Object invoke(org.jboss.invocation.Invocation mi)
           
 java.lang.Object invoke(java.lang.String methodName, java.lang.Class[] types, java.lang.Object[] args)
          Invoke the service through the invoker.
 HASingletonInvokerMBean.Proxy lookupProxy()
          Return the proxy, if it is cached then it will return the cached proxy otherwise it will perform a JNDI lookup.
 void setCallback(HASingletonInvokerMBean.Callback callback)
           
 void setJNDIName(java.lang.String jndiName)
           
 void setJNDIProperties(java.util.Properties jndiProperties)
           
 void setMaxRetries(int maxRetries)
           
 void setProxyFactory(javax.management.ObjectName proxyFactory)
           
 void setRetryWaitingTimeMS(long retryWaitingTimeMS)
           
protected  void startService()
           
 void startSingleton()
           
protected  void stopService()
           
 void stopSingleton()
           
 
Methods inherited from class org.jboss.ha.singleton.HASingletonSupport
_stopOldMaster, isMasterNode, makeThisNodeMaster, partitionTopologyChanged
 
Methods inherited from class org.jboss.ha.jmx.HAServiceMBeanSupport
_receiveRemoteNotification, callAsyncMethodOnPartition, callMethodOnPartition, callMethodOnPartition, findHAPartitionWithName, getDistributedState, getPartition, getPartitionName, getServiceHAName, isDRMMasterReplica, registerDRMListener, registerRPCHandler, sendNotification, sendNotificationRemote, sendNotificationToLocalListeners, setDistributedState, setPartitionName, setupPartition, unregisterDRMListener, unregisterRPCHandler
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, destroyService, getDeploymentInfo, 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
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.ha.singleton.HASingletonMBean
isMasterNode
 
Methods inherited from interface org.jboss.ha.jmx.HAServiceMBean
callMethodOnPartition, getDistributedState, getPartitionName, sendNotification, setDistributedState, setPartitionName
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 

Constructor Detail

HASingletonInvoker

public HASingletonInvoker()
Method Detail

getRetryWaitingTimeMS

public long getRetryWaitingTimeMS()
Description copied from interface: HASingletonInvokerMBean
Return the time that the thread will sleep before looking up a proxy during fail over.

Specified by:
getRetryWaitingTimeMS in interface HASingletonInvokerMBean

setRetryWaitingTimeMS

public void setRetryWaitingTimeMS(long retryWaitingTimeMS)
Specified by:
setRetryWaitingTimeMS in interface HASingletonInvokerMBean
See Also:
HASingletonInvokerMBean.getRetryWaitingTimeMS()

getMaxRetries

public int getMaxRetries()
Description copied from interface: HASingletonInvokerMBean
Return the max number of retries when an invocation is done.

Specified by:
getMaxRetries in interface HASingletonInvokerMBean

setMaxRetries

public void setMaxRetries(int maxRetries)
Specified by:
setMaxRetries in interface HASingletonInvokerMBean
See Also:
HASingletonInvokerMBean.getMaxRetries()

getJNDIProperties

public java.util.Properties getJNDIProperties()
Description copied from interface: HASingletonInvokerMBean
Return the JNDI configuration to lookup the proxy.

Specified by:
getJNDIProperties in interface HASingletonInvokerMBean

setJNDIProperties

public void setJNDIProperties(java.util.Properties jndiProperties)
Specified by:
setJNDIProperties in interface HASingletonInvokerMBean
See Also:
HASingletonInvokerMBean.getJNDIProperties()

getProxyFactory

public javax.management.ObjectName getProxyFactory()
Description copied from interface: HASingletonInvokerMBean
Return the name of the proxy factory to use.

Specified by:
getProxyFactory in interface HASingletonInvokerMBean

setProxyFactory

public void setProxyFactory(javax.management.ObjectName proxyFactory)
Specified by:
setProxyFactory in interface HASingletonInvokerMBean
See Also:
HASingletonInvokerMBean.getProxyFactory()

getCallback

public HASingletonInvokerMBean.Callback getCallback()
Description copied from interface: HASingletonInvokerMBean
Get the callback of the invoker.

Specified by:
getCallback in interface HASingletonInvokerMBean

setCallback

public void setCallback(HASingletonInvokerMBean.Callback callback)
Specified by:
setCallback in interface HASingletonInvokerMBean
See Also:
HASingletonInvokerMBean.getCallback()

getJNDIName

public java.lang.String getJNDIName()
Description copied from interface: HASingletonInvokerMBean
Return the JNDI name under which the proxy is bound.

Specified by:
getJNDIName in interface HASingletonInvokerMBean

setJNDIName

public void setJNDIName(java.lang.String jndiName)
Specified by:
setJNDIName in interface HASingletonInvokerMBean
See Also:
HASingletonInvokerMBean.getJNDIName()

lookupProxy

public HASingletonInvokerMBean.Proxy lookupProxy()
Description copied from interface: HASingletonInvokerMBean
Return the proxy, if it is cached then it will return the cached proxy otherwise it will perform a JNDI lookup.

Specified by:
lookupProxy in interface HASingletonInvokerMBean

invoke

public java.lang.Object invoke(java.lang.String methodName,
                               java.lang.Class[] types,
                               java.lang.Object[] args)
                        throws java.lang.Exception
Description copied from interface: HASingletonInvokerMBean
Invoke the service through the invoker. When the service proxy throws an exception the invoker waits for a specific duration and then perform a new lookup for a certain amount of time.

Specified by:
invoke in interface HASingletonInvokerMBean
Throws:
java.lang.Exception

startService

protected void startService()
                     throws java.lang.Exception
Throws:
java.lang.Exception

stopService

protected void stopService()
                    throws java.lang.Exception
Throws:
java.lang.Exception

startSingleton

public void startSingleton()
Specified by:
startSingleton in interface org.jboss.ha.singleton.HASingleton

stopSingleton

public void stopSingleton()
Specified by:
stopSingleton in interface org.jboss.ha.singleton.HASingleton

invoke

public java.lang.Object invoke(org.jboss.invocation.Invocation mi)
                        throws java.lang.Exception
Throws:
java.lang.Exception