Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8302181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:13:12+00:00 2026-06-08T17:13:12+00:00

I have this Restlet structure: I instanciate a Server object: server = new Server(new

  • 0

I have this Restlet structure:

I instanciate a Server object:

server = new Server(new Context(), config.getServerProtocol(), config
                            .getServerPort());

Afer i instanciate a new MyApp class that extends Application:

app = new org.myproject.restlet.server.MyApp(
    config, server.getContext());
app.start();

And starts the server:

server.setNext(app);
server.start();

I haven’t any Component, MyApp distribute to a Router and process the request. If at this point anybody have a comment, it will be grateful.
I’m using Restlet 2.0.14 JSE, and i link the jetty jars to use it like my http server. My server works ok, i have a javascript client that makes ajax calls, with a classical poll. But i need to implement a long-polling in the server (i discard stream and push modes for some reasons).
I’m reading about how can implement this, the first way (ugly way) could be:
– Sleeping the thread in server and resume when the server may have something. This way is discarded because it isn’t scalable (here are a post about it).
– The second way could be using the Jetty continuations api of version 7. In this link i can see how use the jetty comet api to suspend the request, but i dont know how apply to my restlet implementation, as stated in this another link, i can see:

Continuation continuation = ContinuationSupport.getContinuation(request);
continuation.suspend();

But getContinuation method receives a ServletRequest object. But my request isn’t a ServletRequest. Anybody knows how convert or use a ServletRequest in restlet? Probably i dont have all the concepts with the server programming.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T17:13:13+00:00Added an answer on June 8, 2026 at 5:13 pm

    I can’t use Jetty continuations with the jetty instantied by Restlet. To implement the long-polling I forgot Restlet and implement with the java concurrency: wait() & notify() and everything is running ok.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this form: <%= form_tag posts_path, :method => :get, :class => search_nav do
I have this class: Class B { private String D; private String E; }
We have a restlet server and client. We need to pass the error status
Looking for the guice support in restlet I have come across this article -
i have in my localhost:8111 a restlet app running. This app have a ServerResource
I have a Restlet Service that looks like this: @POST @Produces(application/json) public String processImmediately(String
I have the following public synchronized Restlet createRoot() { Router router = new Router(getContext());
have this code: template<typename T, template<typename, typename> class OuterCont, template<typename, typename> class InnerCont, class
Have this print output from print_r($theobject); SimpleXMLElement Object ( [@attributes] => Array ( [label]
We have a small app with Restlet on the GAE server and GWT and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.