|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--juju.reattore.loadtest.controller.impl.URLTester
Very simple URL tester that gets the contents of the given URL from the given socket.
Constructor Summary | |
URLTester(java.nio.channels.SocketChannel ch,
java.net.URL url)
Create a new tester for later use. |
Method Summary | |
int |
getInterestOps()
Returns the set of operations this handler is currently interested in. |
boolean |
handleConnected()
Called when the socket is initially connected. |
void |
handleError()
Called when any error occurs on the attached socket. |
boolean |
handleReadable()
Called when the attached socket has data available. |
boolean |
handleWritable()
Called when the attached socket is ready to be written to. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public URLTester(java.nio.channels.SocketChannel ch, java.net.URL url)
ch
- An existing unused socket channel.url
- The URL to connect to later.Method Detail |
public boolean handleConnected() throws java.io.IOException
ClientSocketHandler
handleConnected
in interface ClientSocketHandler
java.io.IOException
- if a fatal IO error occurred.ClientSocketHandler
public boolean handleReadable() throws java.io.IOException
ClientSocketHandler
handleReadable
in interface ClientSocketHandler
java.io.IOException
- if a fatal IO error occurred.ClientSocketHandler
public boolean handleWritable() throws java.io.IOException
ClientSocketHandler
handleWritable
in interface ClientSocketHandler
java.io.IOException
- if a fatal IO error occurred.ClientSocketHandler
public int getInterestOps()
Handler
getInterestOps
in interface Handler
ClientSocketHandler
public void handleError()
ClientSocketHandler
handleError
in interface ClientSocketHandler
ClientSocketHandler
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |