org.mortbay.loadbalancer
Class Listener
java.lang.Object
|
+--org.mortbay.util.LifeCycleThread
|
+--org.mortbay.loadbalancer.Listener
- All Implemented Interfaces:
- LifeCycle, java.lang.Runnable
- public class Listener
- extends LifeCycleThread
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Listener
public Listener()
throws java.io.IOException
Listener
public Listener(ByteBufferPool pool,
java.net.InetSocketAddress address,
Policy policy)
throws java.io.IOException
Listener
public Listener(ByteBufferPool pool,
InetAddrPort address,
Policy policy)
throws java.io.IOException
getSelector
public java.nio.channels.Selector getSelector()
getPolicy
public Policy getPolicy()
getInetSocketAddress
public java.net.InetSocketAddress getInetSocketAddress()
setInetSocketAddress
public void setInetSocketAddress(java.net.InetSocketAddress address)
getBufferPool
public ByteBufferPool getBufferPool()
setBufferPool
public void setBufferPool(ByteBufferPool bufferPool)
start
public void start()
throws java.lang.Exception
- Description copied from interface:
LifeCycle
- Start the LifeCycle.
- Specified by:
start
in interface LifeCycle
- Overrides:
start
in class LifeCycleThread
- Throws:
java.lang.Exception
- An arbitrary exception may be thrown.
stop
public void stop()
throws java.lang.InterruptedException
- Description copied from interface:
LifeCycle
- Stop the LifeCycle.
The LifeCycle may wait for current activities to complete
normally, but it can be interrupted.
- Specified by:
stop
in interface LifeCycle
- Overrides:
stop
in class LifeCycleThread
- Throws:
java.lang.InterruptedException
- Stopping a lifecycle is rarely atomic
and may be interrupted by another thread. If this happens
InterruptedException is throw and the component will be in an
indeterminant state and should probably be discarded.
loop
public void loop()
throws java.lang.Exception
- Specified by:
loop
in class LifeCycleThread
java.lang.Exception
Copyright ? 2000 Mortbay Consulting Pty. Ltd. All Rights Reserved.