|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.engine.http.connector.BaseTask
org.restlet.engine.http.connector.Controller
public class Controller
Controls the state of the server helper and its managed connections.
Constructor Summary | |
---|---|
Controller(BaseHelper<?> helper)
Constructor. |
Method Summary | |
---|---|
protected void |
controlConnections()
Control each connection for messages to read or write. |
protected void |
controlHelper()
Control the helper for inbound or outbound messages to handle. |
protected void |
execute(Runnable task)
Executes the next task in a separate thread provided by the worker service, only if the worker service isn't busy. |
protected BaseHelper<?> |
getHelper()
Returns the parent connector helper. |
protected ExecutorService |
getWorkerService()
Returns the helper's worker service. |
boolean |
isOverloaded()
Indicates if the controller is overloaded. |
protected boolean |
isWorkerServiceFull()
Indicates if the helper's worker service is fully busy and can't accept more tasks. |
void |
run()
Listens on the given server socket for incoming connections. |
void |
setOverloaded(boolean overloaded)
Indicates if the controller is overloaded. |
Methods inherited from class org.restlet.engine.http.connector.BaseTask |
---|
isRunning, setRunning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Controller(BaseHelper<?> helper)
helper
- The parent connector helper.Method Detail |
---|
protected void controlConnections() throws IOException
IOException
protected void controlHelper()
protected void execute(Runnable task)
task
- The next task to execute.protected BaseHelper<?> getHelper()
protected ExecutorService getWorkerService()
public boolean isOverloaded()
protected boolean isWorkerServiceFull()
public void run()
public void setOverloaded(boolean overloaded)
overloaded
- True if the controller is overloaded.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |