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.mule.work
Class MuleWorkManager

    java.lang.Object
      org.mule.work.MuleWorkManager

All Implemented Interfaces:
  edu.emory.mathcs.backport.java.util.concurrent.Executor, javax.resource.spi.work.WorkManager, MuleContextAware, Disposable, Startable

    public class MuleWorkManager

extends Object
implements WorkManager, MuleContextAware

`MuleWorkManager` is a JCA Work manager implementation used to manage thread allocation for Mule components and connectors. This code has been adapted from the Geronimo implementation.

Field Summary
`protected static Log` | `logger` logger used by this class

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

Fields inherited from interface org.mule.api.lifecycle.Startable
`PHASE_NAME`

Fields inherited from interface org.mule.api.lifecycle.Disposable
`PHASE_NAME`

Constructor Summary
`MuleWorkManager(ThreadingProfile profile, String name, int shutdownTimeout)`

Method Summary
`void` | `dispose()` A lifecycle method where implementor should free up any resources.
`void` | `doWork(javax.resource.spi.work.Work work)`
`void` | `doWork(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext execContext, javax.resource.spi.work.WorkListener workListener)`
`void` | `execute(Runnable work)`
`MuleContext` | `getMuleContext()`
`XATerminator` | `getXATerminator()`
`boolean` | `isStarted()` Is the WorkManager ready to accept work?
`void` | `scheduleWork(javax.resource.spi.work.Work work)`
`void` | `scheduleWork(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext execContext, javax.resource.spi.work.WorkListener workListener)`
`void` | `setMuleContext(MuleContext muleContext)`
`void` | `start()`
`long` | `startWork(javax.resource.spi.work.Work work)`
`long` | `startWork(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext execContext, javax.resource.spi.work.WorkListener workListener)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### logger

    protected static final Log logger

  logger used by this class

Constructor Detail

### MuleWorkManager

    public MuleWorkManager(ThreadingProfile profile,
                           String name,
                           int shutdownTimeout)

Method Detail

### start

    public void start()
               throws MuleException

  Specified by:
    `start` in interface `Startable`
  Throws:
    `MuleException`

### dispose

    public void dispose()

  Description copied from interface: `Disposable`
  A lifecycle method where implementor should free up any resources. If an exception is thrown it should just be logged and processing should continue. This method should not throw Runtime exceptions.

  Specified by:
    `dispose` in interface `Disposable`

### getXATerminator

    public XATerminator getXATerminator()

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

### doWork

    public void doWork(javax.resource.spi.work.Work work,
                       long startTimeout,
                       javax.resource.spi.work.ExecutionContext execContext,
                       javax.resource.spi.work.WorkListener workListener)
                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)
                   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,
                          long startTimeout,
                          javax.resource.spi.work.ExecutionContext execContext,
                          javax.resource.spi.work.WorkListener workListener)
                   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)
                      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,
                             long startTimeout,
                             javax.resource.spi.work.ExecutionContext execContext,
                             javax.resource.spi.work.WorkListener workListener)
                      throws javax.resource.spi.work.WorkException

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

### execute

    public void execute(Runnable work)

  Specified by:
    `execute` in interface `edu.emory.mathcs.backport.java.util.concurrent.Executor`
  See Also:
    `Executor.execute(Runnable)`

### isStarted

    public boolean isStarted()

  Description copied from interface: `WorkManager`
  Is the WorkManager ready to accept work?

### getMuleContext

    public MuleContext getMuleContext()

### setMuleContext

    public void setMuleContext(MuleContext muleContext)

  Specified by:
    `setMuleContext` in interface `MuleContextAware`

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 © 2003-2010 MuleSoft, Inc.. All Rights Reserved.