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

org.robotframework.remoteserver.servlet.RemoteServerContext Maven / Gradle / Ivy

There is a newer version: 3.6.0
Show newest version
/* Copyright 2014 Kevin Ormbrek
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.robotframework.remoteserver.servlet;

import java.util.Map;
import javax.servlet.Servlet;
import javax.servlet.http.HttpServletRequest;
import org.apache.xmlrpc.webserver.XmlRpcServletServer;
import org.robotframework.remoteserver.library.RemoteLibrary;

public interface RemoteServerContext extends Servlet {

    /**
     * Gets a copy of the current library map. Keys in the map are the paths and
     * the values are {@link RemoteLibrary} wrappers of the libraries being
     * served.
     *
     * @return a copy of the current library map
     */
    Map getLibraryMap();

    /**
     * Returns a {@link HttpServletRequest} object that contains the request the
     * client has made of the remote server servlet.
     *
     * @return {@link HttpServletRequest} object that contains the request the
     * client has made of the remote server servlet
     */
    HttpServletRequest getRequest();

    /**
     * Map the given test library to the specified path. Paths must:
     * 
    *
  • start with a /
  • *
  • contain only alphanumeric characters or any of these: / - . _ ~
  • *
  • not end in a /
  • *
  • not contain a repeating sequence of /s
  • *
* Example: putLibrary("/myLib", new MyLibrary()); * * @param library instance of the test library * @param path path to map the test library to * @return the previous library mapped to the path, or null if there was no * mapping for the path */ RemoteLibrary putLibrary(String path, RemoteLibrary library); /** * Removes the library mapped to the given path if the mapping exists * * @param path path for the library whose mapping is to be removed * @return the previous library associated with the path, or null if there * was no mapping for the path. */ RemoteLibrary removeLibrary(String path); /** * Returns the servlets instance of {@link XmlRpcServletServer}. * * @return The configurable instance of {@link XmlRpcServletServer}. */ XmlRpcServletServer getXmlRpcServletServer(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy