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

How to use
PathUtils
in
org.jboss.ws.httpserver_httpspi

Best Java code snippets using org.jboss.ws.httpserver_httpspi.PathUtils (Showing top 10 results out of 315)

origin: org.jboss.ws.cxf/jbossws-cxf-transports-httpserver

public synchronized void removeHandler(String address)
{
 server.removeContext(PathUtils.getContextPath(address) + PathUtils.getPath(address));
 handlerCount--;
}
origin: org.jboss.ws.projects/jaxws-httpserver-httpspi

/**
* Get the context path section of an address
* 
* @param addr
* @return
*/
public static String getContextPath(String addr)
{
 return getContextPathInternal(getPathFromString(addr));
}
origin: org.jboss.ws.projects/jaxws-httpserver-httpspi

/**
* Get the final path section of an address (for servlet
* container, this is typically a url-pattern for an endpoint)
* 
* @param addr
* @return
*/
public static String getPath(String addr)
{
 return getPathInternal(getPathFromString(addr));
}
origin: org.jboss.ws.projects/jaxws-httpserver-httpspi

@Override
public String getContextPath()
{
 return PathUtils.getContextPath(delegate.getRequestURI());
}
origin: org.jboss.ws.projects/jaxws-httpserver-httpspi

@Override
public HttpContext getHttpContext()
{
 if (contextDelegate == null)
 {
   contextDelegate = new HttpContextDelegate(delegate.getHttpContext(), PathUtils.getPath(delegate.getRequestURI()));
 }
 return contextDelegate;
}
origin: org.jboss.ws.projects/jaxws-httpserver-httpspi

private static String getContextPathInternal(String rawpath)
{
 String path = removeTrailingSlash(rawpath);
 if (path == null || path.length() == 0)
 {
   return "/";
 }
 int idx = path.lastIndexOf("/");
 return idx > 0 ? path.substring(0, idx) : path;
}
origin: org.jboss.ws.projects/jaxws-httpserver-httpspi

public static String getContextPath(URI addr)
{
 return getContextPathInternal(addr.getPath());
}
origin: org.jboss.ws.projects/jaxws-httpserver-httpspi

public static String getPath(URI addr)
{
 return getPathInternal(addr.getPath());
}
origin: org.jboss.ws.projects/jaxws-httpserver-httpspi

private static String getPathInternal(String rawpath)
{
 String path = removeTrailingSlash(rawpath);
 if (path == null || path.length() == 0)
 {
   return path;
 }
 int idx = path.lastIndexOf("/");
 return idx > 0 ? path.substring(path.lastIndexOf("/")) : "";
}
origin: org.jboss.ws.cxf/jbossws-cxf-transports-httpserver

public synchronized void addHandler(String address, HttpHandler handler)
{
 if (server == null) //start the server on first call
 {
   InetSocketAddress isa = host != null ? new InetSocketAddress(host, port) : new InetSocketAddress(port);
   try
   {
    server = HttpServer.create(isa, BACKLOG);
    server.setExecutor(Executors.newCachedThreadPool());
    server.start();
   }
   catch (IOException e)
   {
    throw new RuntimeException(e);
   }
 }
 server.createContext(PathUtils.getContextPath(address) + PathUtils.getPath(address), handler);
 handlerCount++;
}
org.jboss.ws.httpserver_httpspiPathUtils

Most used methods

  • getContextPath
  • getPath
  • getContextPathInternal
  • getPathFromString
  • getPathInternal
  • removeTrailingSlash

Popular in Java

  • Making http requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onRequestPermissionsResult (Fragment)
  • getSharedPreferences (Context)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • JFileChooser (javax.swing)
  • CodeWhisperer alternatives
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