Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.portal.jems.ha
Interface HASingletonInvokerMBean

All Superinterfaces:
  org.jboss.ha.jmx.HAServiceMBean, org.jboss.ha.singleton.HASingletonMBean, javax.management.NotificationBroadcaster, org.jboss.system.Service, org.jboss.system.ServiceMBean

All Known Implementing Classes:
  HASingletonInvoker

    public interface HASingletonInvokerMBean

extends org.jboss.ha.singleton.HASingletonMBean

The ha singleton invoker service extends the ha singleton service and adds the capability to invoke the singleton service from the cluster.

Version:
  $Revision: 8784 $
Author:
  Julien Viet

Nested Class Summary
`static interface` | `HASingletonInvokerMBean.Callback` Contract layer that defines the interactions between the service and the ha invoker.
`static interface` | `HASingletonInvokerMBean.Proxy` The proxy interface bound in JNDI.

Field Summary

Fields inherited from interface org.jboss.ha.singleton.HASingletonMBean
`HASINGLETON_STARTED_NOTIFICATION, HASINGLETON_STARTING_NOTIFICATION, HASINGLETON_STOPPED_NOTIFICATION, HASINGLETON_STOPPING_NOTIFICATION`

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`

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(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)`

Methods inherited from interface org.jboss.ha.singleton.HASingletonMBean
`isMasterNode`

Methods inherited from interface org.jboss.ha.jmx.HAServiceMBean
`callMethodOnPartition, getClusterPartition, getDistributedState, getPartitionName, sendNotification, setClusterPartition, 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`

Method Detail

### getCallback

    HASingletonInvokerMBean.Callback getCallback()

  Get the callback of the invoker.

### setCallback

    void setCallback(HASingletonInvokerMBean.Callback callback)

  See Also:
    `getCallback()`

### getJNDIName

    java.lang.String getJNDIName()

  Return the JNDI name under which the proxy is bound.

### setJNDIName

    void setJNDIName(java.lang.String jndiName)

  See Also:
    `getJNDIName()`

### getProxyFactory

    javax.management.ObjectName getProxyFactory()

  Return the name of the proxy factory to use.

### setProxyFactory

    void setProxyFactory(javax.management.ObjectName proxyFactory)

  See Also:
    `getProxyFactory()`

### getJNDIProperties

    java.util.Properties getJNDIProperties()

  Return the JNDI configuration to lookup the proxy.

### setJNDIProperties

    void setJNDIProperties(java.util.Properties jndiProperties)

  See Also:
    `getJNDIProperties()`

### getMaxRetries

    int getMaxRetries()

  Return the max number of retries when an invocation is done.

### setMaxRetries

    void setMaxRetries(int maxRetries)

  See Also:
    `getMaxRetries()`

### getRetryWaitingTimeMS

    long getRetryWaitingTimeMS()

  Return the time that the thread will sleep before looking up a proxy during fail over.

### setRetryWaitingTimeMS

    void setRetryWaitingTimeMS(long retryWaitingTimeMS)

  See Also:
    `getRetryWaitingTimeMS()`

### lookupProxy

    HASingletonInvokerMBean.Proxy lookupProxy()

  Return the proxy, if it is cached then it will return the cached proxy otherwise it will perform a JNDI lookup.

### invoke

    java.lang.Object invoke(java.lang.String methodName,
                            java.lang.Class[] types,
                            java.lang.Object[] args)
                            throws java.lang.Exception

  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.

  Throws:
    `java.lang.Exception`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD