Package de.aristaflow.adept2.core.client
Class ClientQA
- java.lang.Object
-
- de.aristaflow.adept2.core.client.ClientQA
-
public class ClientQA extends Object
A lot of frameworks use a session ID to identify users. This can be provided to aQualifiedAgent
. 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 normalQualifiedAgent
but itsequals(Object)
andhashCode()
additionally take the session ID into account.- Author:
- Ulrich Kreher
-
-
Field Summary
Fields Modifier and Type Field Description protected QualifiedAgent
agent
The wrappedQualifiedAgent
of this client agent.
-
Constructor Summary
Constructors Constructor Description ClientQA(QualifiedAgent agent)
Creates a new client agent wrapping the designatedQualifiedAgent
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Compares to aQualifiedAgent
and/or to aClientQA
.QualifiedAgent
getAgent()
Gets the wrappedQualifiedAgent
of this client agent.int
hashCode()
String
toString()
-
-
-
Field Detail
-
agent
protected final QualifiedAgent agent
The wrappedQualifiedAgent
of this client agent.
-
-
Constructor Detail
-
ClientQA
public ClientQA(QualifiedAgent agent)
Creates a new client agent wrapping the designatedQualifiedAgent
.- Parameters:
agent
- The qualified agent to be wrapped by a client agent.
-
-
Method Detail
-
getAgent
public QualifiedAgent getAgent()
Gets the wrappedQualifiedAgent
of this client agent.- Returns:
- The wrapped
QualifiedAgent
of this client agent.
-
equals
public boolean equals(Object obj)
Compares to aQualifiedAgent
and/or to aClientQA
. Equal is determined by comparing theagents
and additionally theuser session ID
.
-
-