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

## org.jboss.resource.work
Class JBossWorkManager

    java.lang.Object
      org.jboss.mx.util.JBossNotificationBroadcasterSupport
          org.jboss.system.ServiceMBeanSupport
              org.jboss.resource.work.JBossWorkManager

All Implemented Interfaces:
  JBossWorkManagerMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.system.Service, org.jboss.system.ServiceMBean, javax.resource.spi.work.WorkManager

public class JBossWorkManager
extends org.jboss.system.ServiceMBeanSupport
implements javax.resource.spi.work.WorkManager, JBossWorkManagerMBean

The work manager implementation

Version:
  $Revision: 1.5 $
Author:
  Adrian Brock

Field Summary

Fields inherited from class org.jboss.system.ServiceMBeanSupport
`log, server, SERVICE_CONTROLLER_SIG, serviceName`

Fields inherited from interface javax.resource.spi.work.WorkManager
`IMMEDIATE, INDEFINITE, UNKNOWN`

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

Method Summary
`protected void` | `cancelWork(WorkWrapper wrapper)` Cancel work
`void` | `doWork(javax.resource.spi.work.Work work)`
`void` | `doWork(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext ctx, javax.resource.spi.work.WorkListener listener)`
`protected void` | `endWork(WorkWrapper wrapper)` End work
`protected void` | `executeWork(WorkWrapper wrapper)` Execute the work
`javax.resource.spi.work.WorkManager` | `getInstance()` Get the reference to this work manager
`org.jboss.util.threadpool.ThreadPool` | `getThreadPool()` Retrieve the thread pool
`javax.management.ObjectName` | `getThreadPoolName()` Get the thread pool name
`javax.management.ObjectName` | `getXATerminatorName()` Get the XATerminator
`protected void` | `importWork(WorkWrapper wrapper)` Import any work
`void` | `scheduleWork(javax.resource.spi.work.Work work)`
`void` | `scheduleWork(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext ctx, javax.resource.spi.work.WorkListener listener)`
`void` | `setThreadPool(org.jboss.util.threadpool.ThreadPool threadPool)` Set the thread pool
`void` | `setThreadPoolName(javax.management.ObjectName threadPoolName)` Set the thread pool name
`void` | `setXATerminatorName(javax.management.ObjectName xaTerminatorName)` Set the xa terminator
`protected void` | `startService()`
`long` | `startWork(javax.resource.spi.work.Work work)`
`long` | `startWork(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext ctx, javax.resource.spi.work.WorkListener listener)`
`protected void` | `startWork(WorkWrapper wrapper)` Start work

Methods inherited from class org.jboss.system.ServiceMBeanSupport
`create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop, stopService`

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.system.ServiceMBean
`getName, getState, getStateString, jbossInternalLifecycle`

Methods inherited from interface org.jboss.system.Service
`create, destroy, start, stop`

Constructor Detail

### JBossWorkManager

    public JBossWorkManager()

Method Detail

### getThreadPool

    public org.jboss.util.threadpool.ThreadPool getThreadPool()

  Retrieve the thread pool

  Returns:
    the thread pool

### setThreadPool

    public void setThreadPool(org.jboss.util.threadpool.ThreadPool threadPool)

  Set the thread pool

  Parameters:
    `threadPool` - the thread pool

### getThreadPoolName

    public javax.management.ObjectName getThreadPoolName()

  Get the thread pool name

  Specified by:
    `getThreadPoolName` in interface `JBossWorkManagerMBean`
  Returns:
    the thread pool name

### setThreadPoolName

    public void setThreadPoolName(javax.management.ObjectName threadPoolName)

  Set the thread pool name

  Specified by:
    `setThreadPoolName` in interface `JBossWorkManagerMBean`
  Parameters:
    `threadPoolName` - the thread pool name

### getXATerminatorName

    public javax.management.ObjectName getXATerminatorName()

  Get the XATerminator

  Specified by:
    `getXATerminatorName` in interface `JBossWorkManagerMBean`
  Returns:
    the xa terminator

### setXATerminatorName

    public void setXATerminatorName(javax.management.ObjectName xaTerminatorName)

  Set the xa terminator

  Specified by:
    `setXATerminatorName` in interface `JBossWorkManagerMBean`

### getInstance

    public javax.resource.spi.work.WorkManager getInstance()

  Get the reference to this work manager

  Specified by:
    `getInstance` in interface `JBossWorkManagerMBean`
  Returns:
    the work manager

### doWork

    public void doWork(javax.resource.spi.work.Work work,
                       long startTimeout,
                       javax.resource.spi.work.ExecutionContext ctx,
                       javax.resource.spi.work.WorkListener listener)
                throws javax.resource.spi.work.WorkException

  Specified by:
    `doWork` in interface `javax.resource.spi.work.WorkManager`
  Throws:
    `javax.resource.spi.work.WorkException`

### doWork

    public void doWork(javax.resource.spi.work.Work work)
                throws javax.resource.spi.work.WorkException

  Specified by:
    `doWork` in interface `javax.resource.spi.work.WorkManager`
  Throws:
    `javax.resource.spi.work.WorkException`

### startWork

    public long startWork(javax.resource.spi.work.Work work,
                          long startTimeout,
                          javax.resource.spi.work.ExecutionContext ctx,
                          javax.resource.spi.work.WorkListener listener)
                   throws javax.resource.spi.work.WorkException

  Specified by:
    `startWork` in interface `javax.resource.spi.work.WorkManager`
  Throws:
    `javax.resource.spi.work.WorkException`

### startWork

    public long startWork(javax.resource.spi.work.Work work)
                   throws javax.resource.spi.work.WorkException

  Specified by:
    `startWork` in interface `javax.resource.spi.work.WorkManager`
  Throws:
    `javax.resource.spi.work.WorkException`

### scheduleWork

    public void scheduleWork(javax.resource.spi.work.Work work,
                             long startTimeout,
                             javax.resource.spi.work.ExecutionContext ctx,
                             javax.resource.spi.work.WorkListener listener)
                      throws javax.resource.spi.work.WorkException

  Specified by:
    `scheduleWork` in interface `javax.resource.spi.work.WorkManager`
  Throws:
    `javax.resource.spi.work.WorkException`

### scheduleWork

    public void scheduleWork(javax.resource.spi.work.Work work)
                      throws javax.resource.spi.work.WorkException

  Specified by:
    `scheduleWork` in interface `javax.resource.spi.work.WorkManager`
  Throws:
    `javax.resource.spi.work.WorkException`

### startService

    protected void startService()
                         throws Exception

  Throws:
    `Exception`

### importWork

    protected void importWork(WorkWrapper wrapper)
                       throws javax.resource.spi.work.WorkException

  Import any work

  Parameters:
    `wrapper` - the work wrapper
  Throws:
    `javax.resource.spi.work.WorkException` - for any error

### executeWork

    protected void executeWork(WorkWrapper wrapper)
                        throws javax.resource.spi.work.WorkException

  Execute the work

  Parameters:
    `wrapper` - the work wrapper
  Throws:
    `javax.resource.spi.work.WorkException` - for any error

### startWork

    protected void startWork(WorkWrapper wrapper)
                      throws javax.resource.spi.work.WorkException

  Start work

  Parameters:
    `wrapper` - the work wrapper
  Throws:
    `javax.resource.spi.work.WorkException` - for any error

### endWork

    protected void endWork(WorkWrapper wrapper)

  End work

  Parameters:
    `wrapper` - the work wrapper
  Throws:
    `javax.resource.spi.work.WorkException` - for any error

### cancelWork

    protected void cancelWork(WorkWrapper wrapper)

  Cancel work

  Parameters:
    `wrapper` - the work wrapper
  Throws:
    `javax.resource.spi.work.WorkException` - for any error

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

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