public class Conversation extends Object
Conversation class.
Modifier and Type | Class and Description |
---|---|
static class |
Conversation.ErrorExchange |
Constructor and Description |
---|
Conversation() |
Modifier and Type | Method and Description |
---|---|
void |
addErrorExchange(Exchange ex)
addErrorExchange
|
void |
addExchange(Exchange exchange)
addExchange
|
boolean |
attemptClientConversation(BufferedReader in,
OutputStream out)
attemptClientConversation
|
void |
attemptServerConversation(BufferedReader in,
OutputStream out)
attemptServerConversation
|
static ResponseHandler |
contains(String response)
contains
|
static ResponseHandler |
regexpMatches(String response)
regexpMatches
|
static ResponseHandler |
startsWith(String response)
startsWith
|
public void addExchange(Exchange exchange)
addExchange
exchange
- a Exchange
object.public void addErrorExchange(Exchange ex)
addErrorExchange
ex
- a Exchange
object.public void attemptServerConversation(BufferedReader in, OutputStream out) throws Exception
attemptServerConversation
in
- a BufferedReader
object.out
- a OutputStream
object.Exception
- if any.public boolean attemptClientConversation(BufferedReader in, OutputStream out) throws IOException
attemptClientConversation
in
- a BufferedReader
object.out
- a OutputStream
object.IOException
- if any.public static ResponseHandler startsWith(String response)
startsWith
response
- a String
object.ResponseHandler
object.public static ResponseHandler contains(String response)
contains
response
- a String
object.ResponseHandler
object.public static ResponseHandler regexpMatches(String response)
regexpMatches
response
- a String
object.ResponseHandler
object.Copyright © 2021. All rights reserved.