public class Listener extends LifeCycleThread
Constructor and Description |
---|
Listener() |
Listener(ByteBufferPool pool,
InetAddrPort address,
Policy policy) |
Listener(ByteBufferPool pool,
java.net.InetSocketAddress address,
Policy policy) |
Modifier and Type | Method and Description |
---|---|
ByteBufferPool |
getBufferPool() |
java.net.InetSocketAddress |
getInetSocketAddress() |
Policy |
getPolicy() |
java.nio.channels.Selector |
getSelector() |
void |
loop() |
void |
setBufferPool(ByteBufferPool bufferPool) |
void |
setInetSocketAddress(java.net.InetSocketAddress address) |
void |
start()
Start the LifeCycle.
|
void |
stop()
Stop the LifeCycle.
|
public Listener() throws java.io.IOException
java.io.IOException
public Listener(ByteBufferPool pool, java.net.InetSocketAddress address, Policy policy) throws java.io.IOException
java.io.IOException
public Listener(ByteBufferPool pool, InetAddrPort address, Policy policy) throws java.io.IOException
java.io.IOException
public java.nio.channels.Selector getSelector()
public Policy getPolicy()
public java.net.InetSocketAddress getInetSocketAddress()
public void setInetSocketAddress(java.net.InetSocketAddress address)
public ByteBufferPool getBufferPool()
public void setBufferPool(ByteBufferPool bufferPool)
public void start() throws java.lang.Exception
LifeCycle
start
in interface LifeCycle
start
in class LifeCycleThread
java.lang.Exception
- An arbitrary exception may be thrown.public void stop() throws java.lang.InterruptedException
LifeCycle
stop
in interface LifeCycle
stop
in class LifeCycleThread
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.public void loop() throws java.lang.Exception
loop
in class LifeCycleThread
java.lang.InterruptedException
java.io.InterruptedIOException
java.lang.Exception
Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.