users@grizzly.java.net

Re: Hitting a small compilation problem with: new SelectorThread()

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Wed, 28 Nov 2007 15:25:33 -0500

Alan Williamson wrote:
> Jeanfrancois regarding this issue,
>
>> When you embed Grizzly, create the com.sun.grizzly.http.SelectorThread
>> using the following (assuming t
>>
>> SelectorThread mySelectorThread = new SelectorThread(){
>>
>> /**
>> * Adds and configures <code>ProtocolChain</code>'s filters
>> * @param <code>ProtocolChain</code> to configure
>> */
>> protected void configureFilters(ProtocolChain protocolChain) {
>> if (portUnificationFilter != null) {
>> protocolChain.addFilter(portUnificationFilter);
>> } else {
>> // =========== Inject your Filter here =======================//
>> ReadFilter readFilter = new MyReadFilter();
>> readFilter.setContinuousExecution(true);
>> protocolChain.addFilter(readFilter);
>> }
>>
>> if (rcmSupport){
>> protocolChain.addFilter(createRaFilter());
>> }
>>
>> protocolChain.addFilter(createHttpParserFilter());
>> }
>> };
>>
>> This way your filter will be the first invoked without all the
>> overhead of the http protocol being executed.
>
> I hit up against a compilation error:
>
> The method createHttpParserFilter() from the type SelectorThread
> is not visible
>
> And right enough, its a "private" method.
>
> Can you make it protected? :)

Done :-) I've uploaded the binary on Maven repo as well :-)

-- Jeanfrancois

>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>