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.apache.xmlrpc.common
Class XmlRpcWorkerFactory

    java.lang.Object
      org.apache.xmlrpc.common.XmlRpcWorkerFactory

Direct Known Subclasses:
  XmlRpcClientWorkerFactory, XmlRpcServerWorkerFactory

    public abstract class XmlRpcWorkerFactory

extends java.lang.Object

A factory for `XmlRpcWorker` instances.

Constructor Summary
`XmlRpcWorkerFactory(XmlRpcController pController)` Creates a new instance.

Method Summary
`XmlRpcController` | `getController()` Returns the factory controller.
`int` | `getCurrentRequests()` Returns the number of currently running requests.
`XmlRpcWorker` | `getWorker()` Returns a worker for synchronous processing.
`protected abstract XmlRpcWorker` | `newWorker()` Creates a new worker instance.
`void` | `releaseWorker(XmlRpcWorker pWorker)` Called, when the worker did its job.

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

Constructor Detail

### XmlRpcWorkerFactory

    public XmlRpcWorkerFactory(XmlRpcController pController)

  Creates a new instance.

  Parameters:
    `pController` - The client controlling the factory.

Method Detail

### newWorker

    protected abstract XmlRpcWorker newWorker()

  Creates a new worker instance.

  Returns:
    New instance of `XmlRpcWorker`.

### getController

    public XmlRpcController getController()

  Returns the factory controller.

  Returns:
    The controller, an instance of `XmlRpcClient`, or `XmlRpcServer`.

### getWorker

    public XmlRpcWorker getWorker()
                           throws XmlRpcLoadException

  Returns a worker for synchronous processing.

  Returns:
    An instance of `XmlRpcWorker`, which is ready for use.
  Throws:
    `XmlRpcLoadException` - The clients maximum number of concurrent threads is exceeded.

### releaseWorker

    public void releaseWorker(XmlRpcWorker pWorker)

  Called, when the worker did its job. Frees resources and decrements the number of concurrent requests.

  Parameters:
    `pWorker` - The worker being released.

### getCurrentRequests

    public int getCurrentRequests()

  Returns the number of currently running requests.

  Returns:
    Current number of concurrent requests.

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 © 2001-2010 The Apache Software Foundation. All Rights Reserved.