Request/response distinction

Asked by Marcel Zumstein, Oxinia GmbH on 2009-01-12

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:
2009-01-14
Last query:
2009-01-14
Last reply:
2009-01-14
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).

Thanks Alex Rousskov, that solved my question.