public abstract class Conversation extends Object
Modifier | Constructor and Description |
---|---|
protected |
Conversation(String topic,
int id,
int parentId)
Create a new conversation with the supplied id and topic.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
acceptMessage(byte[] message)
Accept a byte form of a message in the context of a given conversation.
|
Connection |
connection()
Get the connection with which this conversation is associated.
|
boolean |
equals(Object o)
Equality is based on ID
|
int |
hashCode()
Hash code is based on ID
|
int |
id()
Get the unique ID of the conversation.
|
boolean |
isEnded()
Gives indication whether the conversation is ongoing or has been ended.
|
int |
parentId()
Get the unique ID of the parent conversation.
|
protected void |
setConnection(Connection connection)
Associate this conversation with the given connection.
|
String |
topic()
Get the topic on behalf of which the conversation was created.
|
protected Conversation(String topic, int id, int parentId)
topic
- conversation topicid
- unique conversation idparentId
- unique conversation id of the parent conversation; 0 if
no parent conversationpublic String topic()
public int id()
public int parentId()
public Connection connection()
protected void setConnection(Connection connection)
connection
- connection with which this conversation is to be
associatedpublic boolean isEnded()
public abstract void acceptMessage(byte[] message)
message
- byte buffer containing the raw messageCopyright © 2015. All Rights Reserved.