Errai: The browser as a platform

Monday, January 14, 2013

Timing your methods!

Errai 3.0 development continues to move forward unabated. One new feature that I worked on today is something I've being pining for recently.

When you're developing rich web apps, one thing you often find yourself working with are timers. 

They enable animations and timeout logic in your application logic. But since Errai manages beans inside your browser, it seemed like an elegant solution that fits in nicely with other beany features was in order. 

Enter, the @Timed annotation!

This example shows a method that is part of a bean, which we have annotated with the @Timed annotation. In this case we have configured the timer to fire every one second.

You get all the benefits of working in a managed bean environment. For instance, when the bean is destroyed, so to is the timer, implicitly.

Anyways, this just went directly into the Errai 3.0 branch, and if you want to play with it, get forking!

4 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. I was happy to attend your Errai & CDI session in JUDCON 2013 today in Bangalore.
    You were pretty impressive, 3 back to back sessions one after other without break. Wow you have good stamina.

    I want to know, How exactly Errai uses push mechanism to communicate data?
    1. Won't it be an over head on the server side ?
    2. Until when will the server keep contact with the client?
    3. Will there be continuous communication between server & client. Wont it be network overhead.
    4. Is it suitable for all kind of traffic ? or suitable for servers which are having less traffic(client access) ?

    Regards,
    Sandy

    ReplyDelete
  3. I would like to let all know that the size of your Penis really matters in your relationship or marriage. I got married to my wife about 1 month after we met on a photo studio, we lived happily for the first 3 months of our marriage until i and my wife started having quarrels at home because i couldn't satisfy her on bed with my little penis. Actually my penis was very small, it measured about 4.5 inch long on erection and i am 39 years old. My wife said it was forbidden by the women of this world. My wife started sleeping with other men outside. Sometimes i will return from work without finding my wife at home and whenever i call or ask her where she was, she will always snub at me and sometimes just tell me to go get a larger dick. All this continued for a long time and it hurt me so much that i was at the edge of breaking up on the marriage till when i read about a doctor called DR.OMOHAN. online. I never thought i could smile and be in a happy marriage again if not for the help of DR.OMOHAN. I got the doctors Emails:(dromohanherbalmedicine@gmail.com ) on the internet and i emailed him, and he got back to me with some encouraging words, he got me some herbs cream which i use for just 8 days and i began to feel the enlargement of my penis, and without surgery. This went on for a little period of about 10 days and to my surprise my wife keeps screaming that she love my big dick now. Now my wife no longer cheat on me, and my penis is now about 10.5 inches long on erection and off course very large round. And now my wife uses breasts, hips and bums enlargement. I and my wife are very happy for the help rendered to me by DR.OMOHAN , and i want to say a big thanks to Doctor for the help. You can contact the Doctor now on his Email:( dromohanherbalmedicine@gmail.com ) Am thankful to the doctor for helping me.
    his whataspp number +2348164816038

    DOCTOR OMOHAN CAN AS WELL HELP THE FOLLOWING PROBLEMS
    1. HIV/AIDS SPELL
    2. HERPES SPELL
    3. CANCER SPELL
    4 IF YOU WANT YOUR EX LOVER BACK SPELL
    5 IF YOU NEED A BABY SPELLhim to solve
    6 LOW SPERM COUNT SPELL
    get all your problem solve. No problem is too big for him to solve.  

    ReplyDelete