Request/response distinction

Asked by Marcel Zumstein, Oxinia GmbH

Within the adapter, how can I tell whether I'm currently processing a request or a response?

And how can I get an instance of the ResponseLine/RequestLine class?

Question information

Language:
English Edit question
Status:
Solved
For:
eCAP Edit question
Assignee:
Alex Rousskov Edit question
Solved by:
Alex Rousskov
Solved:
Last query:
Last reply:
Revision history for this message
Best Alex Rousskov (rousskov) said :
#1

The Message::firstLine() header determines the direction of the message: requests return RequestLine while responses return StatusLine. Dynamic cast can be used to distinguish the two.

Please note that the host application and its configuration determines what message kinds the adapter receives.

You can only get a reference or pointer to the RequestLine or StatusLine object. You cannot get an instance of those classes because they are abstract (the host application usually determines what they really are).

Revision history for this message
Marcel Zumstein, Oxinia GmbH (zumstein-oxinia) said :
#2

Thanks Alex Rousskov, that solved my question.