/*
* Sewing: a Simple framework for Embedded-OSGi Web Development
* Copyright (C) 2009 Bug Labs
* Email: bballantine@buglabs.net
* Site: http://www.buglabs.net
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
package com.buglabs.osgi.sewing;
import org.osgi.framework.BundleContext;
import org.osgi.service.http.HttpService;
import com.buglabs.osgi.sewing.pub.ISewingService;
import com.buglabs.osgi.sewing.pub.SewingHttpServlet;
public class SewingServiceImpl implements ISewingService {
private HttpService http_service;
public SewingServiceImpl(HttpService httpService) {
http_service = httpService;
}
public void register(BundleContext context, String alias, SewingHttpServlet sewingServlet) {
sewingServlet.setup(context, http_service, alias);
}
public void unregister(SewingHttpServlet sewingServlet) {
sewingServlet.teardown(http_service);
}
}