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 normalQualifiedAgentbut itsequals(Object)andhashCode()additionally take the session ID into account.- Author:
- Ulrich Kreher
-
-
Field Summary
Fields Modifier and Type Field Description protected QualifiedAgentagentThe wrappedQualifiedAgentof 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 booleanequals(Object obj)Compares to aQualifiedAgentand/or to aClientQA.QualifiedAgentgetAgent()Gets the wrappedQualifiedAgentof this client agent.inthashCode()StringtoString()
-
-
-
Field Detail
-
agent
protected final QualifiedAgent agent
The wrappedQualifiedAgentof 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 wrappedQualifiedAgentof this client agent.- Returns:
- The wrapped
QualifiedAgentof this client agent.
-
equals
public boolean equals(Object obj)
Compares to aQualifiedAgentand/or to aClientQA. Equal is determined by comparing theagentsand additionally theuser session ID.
-
-