public class SimpleAjpClient extends Object
| Constructor and Description |
|---|
SimpleAjpClient() |
| Modifier and Type | Method and Description |
|---|---|
void |
connect(String host,
int port) |
TesterAjpMessage |
cping()
Tests the connection to the server and returns the CPONG response.
|
TesterAjpMessage |
createBodyMessage(byte[] data) |
TesterAjpMessage |
createForwardMessage(String url)
Create a message to request the given URL.
|
TesterAjpMessage |
createForwardMessage(String url,
int method) |
void |
disconnect() |
int |
getPort() |
protected boolean |
read(InputStream is,
byte[] buf,
int pos,
int n) |
TesterAjpMessage |
readMessage()
Reads a message from the server.
|
TesterAjpMessage |
sendMessage(TesterAjpMessage headers)
Sends an TesterAjpMessage to the server and returns the response message.
|
TesterAjpMessage |
sendMessage(TesterAjpMessage headers,
TesterAjpMessage body) |
public int getPort()
public void connect(String host, int port) throws IOException
IOExceptionpublic void disconnect()
throws IOException
IOExceptionpublic TesterAjpMessage createForwardMessage(String url)
public TesterAjpMessage createForwardMessage(String url, int method)
public TesterAjpMessage createBodyMessage(byte[] data)
public TesterAjpMessage sendMessage(TesterAjpMessage headers) throws IOException
IOExceptionpublic TesterAjpMessage sendMessage(TesterAjpMessage headers, TesterAjpMessage body) throws IOException
IOExceptionpublic TesterAjpMessage cping() throws IOException
IOExceptionpublic TesterAjpMessage readMessage() throws IOException
IOExceptionprotected boolean read(InputStream is, byte[] buf, int pos, int n) throws IOException
IOExceptionCopyright © 2013. All rights reserved.