users@grizzly.java.net

Re: newbie question

From: Erik Svensson <erik_at_phlogiston.se>
Date: Fri, 14 Mar 2008 21:35:51 +0100

> That's probably a typo...

Funnily enough it is but not kind you would think.
When I typed up the html I forgot to replace the '<' and '>' in
onConnect(IOEvent<Context> e)
with &lt; and &gt; which the browser regards as tags. If you download
the source it compiles but if
you do cut'n'paste from the browser it doesn't.

I include a fixed version.

Jeanfrancois, can you replace the version on the grizzly site with
the one included in this mail?

cheers

/Erik


>
> Thanks!
>
> -- Jeanfrancois
>
> Greg Tam wrote:
>> Nevermind
>> i just casted the e.attachment() to Context
>> On Fri, Mar 14, 2008 at 9:17 AM, Greg Tam <macgngsta_at_gmail.com
>> <mailto:macgngsta_at_gmail.com>> wrote:
>> in the code from
>> https://grizzly.dev.java.net/tutorials/client-ant-tutorial/
>> index.html
>> while using java 1.6
>> it complains on line 5 - what kind of IOEvent should it be
>> accepting? (Cannot instantiate the type IOEvent)
>> it complains on line 17 (The method getSelectionKey() is
>> undefined
>> for the type IOEvent)
>> 1 connectorHandler.connect(new InetSocketAddress(host, port),
>> new
>> CallbackHandler()
>> 2 {
>> 3 public void onConnect(IOEvent e)
>> 4 {
>> 5 SelectionKey k = e.attachment
>> ().getSelectionKey();
>> 6 System.out.println("CallbackHandler: On
>> Connect...");
>> 7 try
>> 8 {
>> 9 connectorHandler.finishConnect(k);
>> 10 }
>> 11 catch (Exception ex)
>> 12 {
>> 13 System.err.println("Exception in
>> Callback: "
>> 14 + ex.getMessage());
>> 15 }
>> 16
>> 17 e.attachment().getSelectorHandler
>> ().register(k, SelectionKey.OP_READ);
>> 18 }
>> On Thu, Mar 13, 2008 at 5:24 PM, Jeanfrancois Arcand
>> <Jeanfrancois.Arcand_at_sun.com
>> <mailto:Jeanfrancois.Arcand_at_sun.com>>
>> wrote:
>> Erik Svensson wrote:
>> >> basically it will be like a ftp server but with a few
>> modifications.
>> >> this is more like an update content management system.
>> the
>> client will
>> >> be "pushed" content packages and will then update the
>> server on
>> >> status/progress. the server will most likely keep
>> track of all
>> >> transactions in some type of database.
>> >
>> > In that case grizzly can fill your needs.
>> Yes, and you might want to look at [1] as a started. The
>> [2] has
>> several
>> tutorial on the topic.
>> Feel free to ask question!
>> A+
>> -- Jeanfrancois
>> [1]http://weblogs.java.net/blog/jfarcand/archive/2008/03/
>> vrrrrrooommm_je.html
>> [2]https://grizzly.dev.java.net/
>> >
>> > cheers
>> > /Erik
>> >
>> >> On Thu, Mar 13, 2008 at 11:15 AM, Greg Tam
>> <macgngsta_at_gmail.com <mailto:macgngsta_at_gmail.com>
>> >> <mailto:macgngsta_at_gmail.com
>> <mailto:macgngsta_at_gmail.com>>>
>> wrote:
>> >>
>> >> I want to create a file server is Grizzly the correct
>> framework to
>> >> use?
>> >>
>> >> The file server will allow connections from
>> clients that
>> will
>> >> upload and download files that could be x MB in size.
>> >>
>> >>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-
>> unsubscribe_at_grizzly.dev.java.net
>> <mailto:users-unsubscribe_at_grizzly.dev.java.net>
>> For additional commands, e-mail: users-
>> help_at_grizzly.dev.java.net
>> <mailto:users-help_at_grizzly.dev.java.net>
>> -- Cze-Jwin Gregory Tam
>> macgngsta_at_gmail.com <mailto:macgngsta_at_gmail.com>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>