All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.neo4j.server.web.WebServer Maven / Gradle / Ivy

There is a newer version: 5.26.1
Show newest version
/*
 * Copyright (c) 2002-2016 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.server.web;

import org.eclipse.jetty.server.RequestLog;
import org.eclipse.jetty.server.Server;

import java.io.IOException;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import java.util.function.Consumer;
import javax.servlet.Filter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.neo4j.bolt.security.ssl.KeyStoreInformation;
import org.neo4j.helpers.HostnamePort;
import org.neo4j.server.database.InjectableProvider;
import org.neo4j.server.plugins.Injectable;

public interface WebServer
{
    void setAddress( HostnamePort address );

    void setHttpsAddress( Optional address );

    void setHttpsCertificateInformation( KeyStoreInformation config );

    void setRequestLog( RequestLog requestLog );

    void setMaxThreads( int maxThreads );

    void start() throws Exception;

    void stop();

    void addJAXRSPackages( List packageNames, String serverMountPoint, Collection> injectables );
    void removeJAXRSPackages( List packageNames, String serverMountPoint );

    void addJAXRSClasses( List classNames, String serverMountPoint, Collection> injectables );
    void removeJAXRSClasses( List classNames, String serverMountPoint );

    void addFilter(Filter filter, String pathSpec);
    void removeFilter(Filter filter, String pathSpec);

    void addStaticContent( String contentLocation, String serverMountPoint );
    void removeStaticContent( String contentLocation, String serverMountPoint );

    void invokeDirectly( String targetUri, HttpServletRequest request, HttpServletResponse response )
        throws IOException, ServletException;

    void setWadlEnabled( boolean wadlEnabled );

    void setDefaultInjectables( Collection> defaultInjectables );

    void setJettyCreatedCallback( Consumer callback );
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy