Package de.aristaflow.adept2.core.client
Class ClientQA
java.lang.Object
de.aristaflow.adept2.core.client.ClientQA
A lot of frameworks use a session ID to identify users. This can be provided to a
This class wraps a normal
QualifiedAgent. However, this ID will normally be ignored when comparing agents. This is
insufficient for client applications and components that are based on such frameworks. In these
cases the ID needs to be respected when comparing agents.This class wraps a normal
QualifiedAgent but its equals(Object) and
hashCode() additionally take the session ID into account.
Never compare a QualifiedAgent with this, that is, never call
QualifiedAgent.equals(Object) with a ClientQA instance; only call
equals(Object) with a ClientQA or a QualifiedAgent.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final QualifiedAgentThe wrappedQualifiedAgentof this client agent. -
Constructor Summary
ConstructorsConstructorDescriptionClientQA(QualifiedAgent agent) Creates a new client agent wrapping the designatedQualifiedAgent. -
Method Summary
-
Field Details
-
agent
The wrappedQualifiedAgentof this client agent.
-
-
Constructor Details
-
ClientQA
Creates a new client agent wrapping the designatedQualifiedAgent.- Parameters:
agent- The qualified agent to be wrapped by a client agent.
-
-
Method Details
-
getAgent
Gets the wrappedQualifiedAgentof this client agent.- Returns:
- The wrapped
QualifiedAgentof this client agent.
-
toString
-
equals
Compares to aQualifiedAgentand/or to aClientQA. Equal is determined by comparing theagentsand additionally theuser session ID. -
hashCode
public int hashCode()
-