congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
org.jooby
Code IndexAdd Tabnine to your IDE (free)

How to use org.jooby

Best Java code snippets using org.jooby (Showing top 20 results out of 504)

origin: jooby-project/jooby

@Override
default void handle(final Request req, final Response rsp, final Route.Chain chain)
  throws Throwable {
 Object result = handle();
 rsp.send(result);
 chain.next(req, rsp);
}
origin: jooby-project/jooby

@Override
default void handle(final Request req, final Response rsp, final Route.Chain chain)
  throws Throwable {
 Object result = handle(req);
 rsp.send(result);
 chain.next(req, rsp);
}
origin: jooby-project/jooby

 @Override
 public void render(final Object value, final Context ctx) throws Exception {
  if (value instanceof Asset) {
   Asset resource = ((Asset) value);
   ctx.type(resource.type())
     .length(resource.length())
     .send(resource.stream());
  }
 }
},
origin: jooby-project/jooby

@Override
public void writeResponseContent(final String content) {
 try {
  rsp.send(content);
 } catch (Throwable ex) {
  throw new Err(Status.SERVER_ERROR, ex);
 }
}
origin: jooby-project/jooby

@Override
default void handle(final Request req, final Response rsp, final Chain chain) throws Throwable {
 rsp.complete(this);
 chain.next(req, rsp);
}
origin: jooby-project/jooby

/**
 * Creates a new {@link Err}.
 *
 * @param status A HTTP status. Required.
 * @param cause The cause of the problem.
 */
public Err(final Status status, final Throwable cause) {
 super(message(status, null), cause);
 this.status = status.value();
}
origin: jooby-project/jooby

/**
 * Set event media type. Useful for sengin json, xml, etc..
 *
 * @param type Media Type.
 * @return This event.
 */
public Event type(final String type) {
 return type(MediaType.valueOf(type));
}
origin: jooby-project/jooby

/**
 * Test if the route definition can consume a media type.
 *
 * @param types A media types to test.
 * @return True, if the route can produces the given media type.
 */
public boolean canProduce(final List<MediaType> types) {
 return MediaType.matcher(types).matches(produces);
}
origin: jooby-project/jooby

/**
 * Test if the route definition can consume a media type.
 *
 * @param types A media types to test.
 * @return True, if the route can produces the given media type.
 */
public boolean canProduce(final String... types) {
 return canProduce(MediaType.valueOf(types));
}
origin: jooby-project/jooby

@Override
public Route.Collection get(final String path1, final String path2,
  final Route.ZeroArgHandler handler) {
 return new Route.Collection(
   new Route.Definition[]{get(path1, handler), get(path2, handler)});
}
origin: jooby-project/jooby

@Override
public Route.Collection patch(final String path1, final String path2,
  final String path3, final Route.Handler handler) {
 return new Route.Collection(
   new Route.Definition[]{patch(path1, handler), patch(path2, handler),
     patch(path3, handler)});
}
origin: jooby-project/jooby

@Override
public Route.Collection put(final String path1, final String path2,
  final Route.OneArgHandler handler) {
 return new Route.Collection(
   new Route.Definition[]{put(path1, handler), put(path2, handler)});
}
origin: jooby-project/jooby

@Override
public Route.Collection post(final String path1, final String path2,
  final Route.Filter filter) {
 return new Route.Collection(
   new Route.Definition[]{post(path1, filter), post(path2, filter)});
}
origin: jooby-project/jooby

@Override
public Route.Collection delete(final String path1, final String path2,
  final Route.OneArgHandler handler) {
 return new Route.Collection(
   new Route.Definition[]{delete(path1, handler), delete(path2, handler)});
}
origin: jooby-project/jooby

/**
 * Set property source.
 *
 * @param source Source.
 * @return This resolver.
 */
public Resolver source(final Config source) {
 return source(new ConfigSource(source));
}
origin: jooby-project/jooby

/**
 * Set property source.
 *
 * @param source Source.
 * @return This resolver.
 */
public Resolver source(final Map<String, Object> source) {
 return source(new MapSource(source));
}
origin: jooby-project/jooby

@Override
public Route.Collection get(final String path1, final String path2,
  final String path3, final Route.Filter filter) {
 return new Route.Collection(
   new Route.Definition[]{get(path1, filter), get(path2, filter), get(path3, filter)});
}
origin: jooby-project/jooby

@Override
public Route.Collection patch(final String path1, final String path2,
  final String path3, final Route.ZeroArgHandler handler) {
 return new Route.Collection(
   new Route.Definition[]{patch(path1, handler), patch(path2, handler),
     patch(path3, handler)});
}
origin: jooby-project/jooby

@Override
public Route.Collection put(final String path1, final String path2,
  final Route.ZeroArgHandler handler) {
 return new Route.Collection(
   new Route.Definition[]{put(path1, handler), put(path2, handler)});
}
origin: jooby-project/jooby

@Override
public Route.Collection patch(final String path1, final String path2,
  final Route.Filter filter) {
 return new Route.Collection(
   new Route.Definition[]{patch(path1, filter), patch(path2, filter)});
}
org.jooby

Most used classes

  • Env
    Allows to optimize, customize or apply defaults values for application services. A env is represent
  • Try
    Functional try and try-with-resources implementation.
  • MediaType
    An immutable implementation of HTTP media types (a.k.a mime types).
  • Router
    Route DSL. Constructs and creates several flavors of jooby routes.
  • Env$ServiceKey
    Utility class for generating Key for named services.
  • Request,
  • Throwing,
  • Session,
  • Throwing$Function,
  • Route,
  • Session$Builder,
  • V8Engine,
  • Mutant,
  • Response,
  • Registry,
  • Renderer$Context,
  • Route$Definition,
  • Jooby,
  • Results
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now