Tabnine Logo
UrlReWriterHandler
Code IndexAdd Tabnine to your IDE (free)

How to use
UrlReWriterHandler
in
cc.blynk.core.http.handlers.url

Best Java code snippets using cc.blynk.core.http.handlers.url.UrlReWriterHandler (Showing top 2 results out of 315)

origin: blynkkk/blynk-server

@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
  if (msg instanceof FullHttpRequest) {
    FullHttpRequest request = (FullHttpRequest) msg;
    String requestUri = request.uri();
    String mapToURI = mapTo(requestUri);
    log.trace("Mapping from {} to {}", requestUri, mapToURI);
    request.setUri(mapToURI);
  }
  super.channelRead(ctx, msg);
}
origin: blynkkk/blynk-server

private void initHttpPipeline(ChannelHandlerContext ctx) {
  ctx.pipeline()
      .addLast(letsEncryptHandler)
      .addLast("HttpChunkedWrite", new ChunkedWriteHandler())
      .addLast("HttpUrlMapper", new UrlReWriterHandler("/favicon.ico", "/static/favicon.ico"))
      .addLast("HttpStaticFile", new StaticFileHandler(holder.props, new StaticFile("/static"),
              new StaticFileEdsWith(FileUtils.CSV_DIR, ".gz"),
              new StaticFileEdsWith(FileUtils.CSV_DIR, ".zip")))
      .addLast(resetPasswordLogic)
      .addLast(httpAPILogic)
      .addLast(noMatchHandler)
      .remove(this);
  if (log.isTraceEnabled()) {
    log.trace("Initialized http pipeline. {}", ctx.pipeline().names());
  }
}
cc.blynk.core.http.handlers.urlUrlReWriterHandler

Javadoc

The Blynk Project. Created by Dmitriy Dumanskiy. Created on 13.05.16.

Most used methods

  • <init>
  • mapTo

Popular in Java

  • Running tasks concurrently on multiple threads
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setContentView (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • JComboBox (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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