org.apache.http.HttpServerConnection Java Examples

The following examples show how to use org.apache.http.HttpServerConnection. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HttpServerConnectionUpnpStream.java    From TVRemoteIME with GNU General Public License v2.0 6 votes vote down vote up
protected HttpServerConnectionUpnpStream(ProtocolFactory protocolFactory,
                                         HttpServerConnection connection,
                                         final HttpParams params) {
    super(protocolFactory);
    this.connection = connection;
    this.params = params;

    // The Date header is recommended in UDA, need to document the requirement in StreamServer interface?
    httpProcessor.addInterceptor(new ResponseDate());

    // The Server header is only required for Control so callers have to add it to UPnPMessage
    // httpProcessor.addInterceptor(new ResponseServer());

    httpProcessor.addInterceptor(new ResponseContent());
    httpProcessor.addInterceptor(new ResponseConnControl());

    httpService =
            new UpnpHttpService(
                    httpProcessor,
                    new DefaultConnectionReuseStrategy(),
                    new DefaultHttpResponseFactory()
            );
    httpService.setParams(params);
}
 
Example #2
Source File: HttpServerConnectionUpnpStream.java    From DroidDLNA with GNU General Public License v3.0 6 votes vote down vote up
protected HttpServerConnectionUpnpStream(ProtocolFactory protocolFactory,
                                         HttpServerConnection connection,
                                         final HttpParams params) {
    super(protocolFactory);
    this.connection = connection;
    this.params = params;

    // The Date header is recommended in UDA, need to document the requirement in StreamServer interface?
    httpProcessor.addInterceptor(new ResponseDate());

    // The Server header is only required for Control so callers have to add it to UPnPMessage
    // httpProcessor.addInterceptor(new ResponseServer());

    httpProcessor.addInterceptor(new ResponseContent());
    httpProcessor.addInterceptor(new ResponseConnControl());

    httpService =
            new UpnpHttpService(
                    httpProcessor,
                    new DefaultConnectionReuseStrategy(),
                    new DefaultHttpResponseFactory()
            );
    httpService.setParams(params);
}
 
Example #3
Source File: TinyHttpServer.java    From spydroid-ipcamera with GNU General Public License v3.0 5 votes vote down vote up
public WorkerThread(
		final org.apache.http.protocol.HttpService httpservice, 
		final HttpServerConnection conn,
		final Socket socket) {
	super();
	this.httpservice = httpservice;
	this.conn = conn;
	this.socket = socket;
}
 
Example #4
Source File: WorkerThread.java    From AndroidWebServ with Apache License 2.0 5 votes vote down vote up
public WorkerThread(HttpService httpservice, HttpServerConnection conn,
        OnWebServListener listener) {
    super();
    this.httpservice = httpservice;
    this.conn = conn;
    this.listener = listener;
}
 
Example #5
Source File: HttpServerConnectionUpnpStream.java    From TVRemoteIME with GNU General Public License v2.0 4 votes vote down vote up
public HttpServerConnection getConnection() {
    return connection;
}
 
Example #6
Source File: ApiServer.java    From cosmic with Apache License 2.0 4 votes vote down vote up
public WorkerTask(final HttpService httpService, final HttpServerConnection conn, final int count) {
    _httpService = httpService;
    _conn = conn;
}
 
Example #7
Source File: HttpServerConnectionUpnpStream.java    From DroidDLNA with GNU General Public License v3.0 4 votes vote down vote up
public HttpServerConnection getConnection() {
    return connection;
}
 
Example #8
Source File: ApiServer.java    From cloudstack with Apache License 2.0 4 votes vote down vote up
public WorkerTask(final HttpService httpService, final HttpServerConnection conn, final int count) {
    _httpService = httpService;
    _conn = conn;
}