Jerome Dochez wrote:
> There would be a slightly different way of doing this. I have not
> completed the APIs yet but
Will this include a way for the code to select which specific
configuration is of interest (default, instance-A, cluster-X, etc.) so
the injection would provide that specific configuration's value for
HttpListener?
This looks pretty nice.
- Tim
> the basic idea out be :
>
> @Inject
> HttpListener httpListener; // you get the translated view
>
> httpListener.getPor() ---> 8080
>
> Somewhere now you want the raw value, you do ...
>
> HttpListener rawHttpListener = ConfigUtils.getRawView(httpListener);
> rawHttpListener.getPort() ----> ${com.aas.instance.httpPort}
>
> Another example of views is WriteableViews :
>
> httpListener.setPort("foo.bar")
>
> would trigger an exception but...
>
> HttpListener writeableView = ConfigUtils.getWriteableView(httpListener);
> writeableView.setPort("${com.foo.bar") // when writing, you always
> write to Raw
>
> HTH, Jerome