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

com.eclipsesource.jaxrs.publisher.ServletConfiguration Maven / Gradle / Ivy

Go to download

With the connector OSGi services can be published as RESTful web services by simply registering them as OSGi services.

The newest version!
/*******************************************************************************
 * Copyright (c) 2015 Ivan Iliev and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    Ivan Iliev - initial API and implementation
 *    Holger Staudacher  - ongoing development
 ******************************************************************************/
package com.eclipsesource.jaxrs.publisher;

import java.util.Dictionary;

import org.osgi.service.http.HttpContext;
import org.osgi.service.http.HttpService;

/**
 * 

* Service that allows contribution of initial parameters and HttpContext for the Jersey servlet. * Only the first tracked service implementing this interface will be used. *

* * @since 4.2 */ public interface ServletConfiguration { /** *

* Returns an HttpContext or null for the given httpService and rootPath. *

* * @param httpService the {@link HttpService} to configure the servlet for. * @param rootPath the configured root path of the servlet to register. * @return the {@link HttpContext} to use for the servlet registration. */ HttpContext getHttpContext( HttpService httpService, String rootPath ); /** *

* Returns initial parameters or null for the given httpService and rootPath. *

* @param httpService the {@link HttpService} to configure the servlet for. * @param rootPath the configured root path of the servlet to register. * @return the init properties to use for the servlet registration. */ Dictionary getInitParams( HttpService httpService, String rootPath ); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy