Context#createChildContext()

2 messages Options
Embed this post
Permalink
Jonathan Hall

Context#createChildContext()

Reply Threaded More More options
Print post
Permalink
Hi,

Am I misunderstanding the use/naming of Context#createChildContext() ?

I would have expected it to return an isolated copy of the Context
(which would be useful), however it just returns a new Context()
instance. In which case, I am not sure why it is called a child.

Wouldn't the code be easier to read if we just created a new Context()
ourselves instead of this method?

jon

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=2390137
Jonathan Hall

Re: Context#createChildContext()

Reply Threaded More More options
Print post
Permalink
Doh, nevermind that.

My issue is that the engine sets the ClientDispatcher and
ServerDispatcher when I would like a full copy, attributes etc.

jon

Jonathan Hall wrote:

> Hi,
>
> Am I misunderstanding the use/naming of Context#createChildContext() ?
>
> I would have expected it to return an isolated copy of the Context
> (which would be useful), however it just returns a new Context()
> instance. In which case, I am not sure why it is called a child.
>
> Wouldn't the code be easier to read if we just created a new Context()
> ourselves instead of this method?
>
> jon
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=2390149