/*
 * JBoss, the OpenSource J2EE webOS
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.web.loadbalancer;

/**
 * MBean interface.
 */
public interface LoadbalancerServiceMBean extends org.jboss.system.ServiceMBean
{

   //default object name
   public static final javax.management.ObjectName OBJECT_NAME = org.jboss.mx.util.ObjectNameFactory
         .create("jboss.web.loadbalancer: service=Loadbalancer");

   /**
    * Set the scheduler for this Loadbalancer.
    * @param schedulerObjectName    */
   void setScheduler(javax.management.ObjectName schedulerObjectName);

   /**
    * Get the scheduler for this Loadbalancer.
    */
   javax.management.ObjectName getScheduler();

   /**
    * Get the currently used connection timeout to slave hosts.
    */
   int getConnectionTimeout();

   /**
    * Set the currently used connection timeout to slave hosts.
    */
   void setConnectionTimeout(int newTimeout);

   /**
    * Get the currently used connections to slave hosts.
    */
   int getConnectionsInUse();

   void createMethod(org.jboss.web.loadbalancer.util.Request schedRequest)
         throws org.jboss.web.loadbalancer.scheduler.NoHostAvailableException;

   void addRequestData(org.jboss.web.loadbalancer.util.Request schedRequest);

   void handleRequest(org.jboss.web.loadbalancer.util.Request schedRequest) throws javax.servlet.ServletException,
         java.io.IOException;

}
