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.web.loadbalancer
Class Loadbalancer

    java.lang.Object
      org.jboss.web.loadbalancer.Loadbalancer

All Implemented Interfaces:
  LoadbalancerMBean

public class Loadbalancer
extends Object
implements LoadbalancerMBean

The Loadbalancer core class.

Version:
  $Revision: 1.9 $
Author:
  Thomas Peuss

Field Summary
`protected org.apache.commons.httpclient.MultiThreadedHttpConnectionManager` | `connectionManager`
`protected int` | `connectionTimeout`
`protected static Set` | `ignorableHeader`
`protected static org.jboss.logging.Logger` | `log`
`protected static int` | `MAX_RETRIES`
`protected SchedulerMBean` | `scheduler`
`protected javax.management.ObjectName` | `schedulerName`

Fields inherited from interface org.jboss.web.loadbalancer.LoadbalancerMBean
`OBJECT_NAME`

Constructor Summary
`protected` | `Loadbalancer(SchedulerMBean scheduler, int timeout)`

Method Summary
`protected void` | `addRequestData(Request schedRequest)` Add the request information to the HttpMethod
`protected void` | `copyServerResponse(Request schedRequest)` Copy content to the client.
`protected void` | `createMethod(Request schedRequest)` Create a HttpMethod object for the given request.
`int` | `getConnectionsInUse()` Get the currently used connections to slave hosts.
`int` | `getConnectionTimeout()` Get the currently used connection timeout to slave hosts.
`protected void` | `handleRequest(Request schedRequest)` Handle the client request.
`protected void` | `parseServerResponse(Request schedRequest)` Copy the server answer meta data to the client.
`protected void` | `prepareServerRequest(Request schedRequest)` Prepare the request to the target node.
`void` | `setConnectionTimeout(int newTimeout)` Set the currently used connection timeout to slave hosts.

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

Field Detail

### log

    protected static org.jboss.logging.Logger log

### connectionManager

    protected org.apache.commons.httpclient.MultiThreadedHttpConnectionManager connectionManager

### ignorableHeader

    protected static Set ignorableHeader

### connectionTimeout

    protected int connectionTimeout

### scheduler

    protected SchedulerMBean scheduler

### schedulerName

    protected javax.management.ObjectName schedulerName

### MAX_RETRIES

    protected static final int MAX_RETRIES

See Also:
  Constant Field Values

Constructor Detail

### Loadbalancer

    protected Loadbalancer(SchedulerMBean scheduler,
                           int timeout)
                    throws javax.servlet.ServletException

Method Detail

### createMethod

    protected void createMethod(Request schedRequest)
                         throws NoHostAvailableException

  Create a HttpMethod object for the given request.

  Returns:
  Throws:
    `NoHostAvailableException`

### addRequestData

    protected void addRequestData(Request schedRequest)

  Add the request information to the HttpMethod

  Returns:

### prepareServerRequest

    protected void prepareServerRequest(Request schedRequest)

  Prepare the request to the target node.

  Returns:

### handleRequest

    protected void handleRequest(Request schedRequest)
                          throws javax.servlet.ServletException,
                                 IOException

  Handle the client request.

  Throws:
    `javax.servlet.ServletException`
    `IOException`

### parseServerResponse

    protected void parseServerResponse(Request schedRequest)
                                throws javax.servlet.ServletException,
                                       IOException

  Copy the server answer meta data to the client.

  Throws:
    `javax.servlet.ServletException`
    `IOException`

### copyServerResponse

    protected void copyServerResponse(Request schedRequest)
                               throws IOException

  Copy content to the client.

  Throws:
    `IOException`

### getConnectionTimeout

    public int getConnectionTimeout()

  Get the currently used connection timeout to slave hosts.

  Specified by:
    `getConnectionTimeout` in interface `LoadbalancerMBean`

### setConnectionTimeout

    public void setConnectionTimeout(int newTimeout)

  Set the currently used connection timeout to slave hosts.

  Specified by:
    `setConnectionTimeout` in interface `LoadbalancerMBean`

### getConnectionsInUse

    public int getConnectionsInUse()

  Get the currently used connections to slave hosts.

  Specified by:
    `getConnectionsInUse` in interface `LoadbalancerMBean`

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.