Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.fourthline.cling.transport.impl.apache
Class StreamClientImpl

    java.lang.Object
      org.fourthline.cling.transport.spi.AbstractStreamClient<StreamClientConfigurationImpl,org.apache.http.client.methods.HttpUriRequest>
          org.fourthline.cling.transport.impl.apache.StreamClientImpl

All Implemented Interfaces:
  StreamClient<StreamClientConfigurationImpl>

    public class StreamClientImpl

extends AbstractStreamClient<StreamClientConfigurationImpl,org.apache.http.client.methods.HttpUriRequest>

Implementation based on Apache HTTP Components 4.2.

This implementation DOES NOT WORK on Android. Read the Cling manual for alternatives on Android.

Author:
  Christian Bauer

Field Summary
`protected org.apache.http.impl.conn.PoolingClientConnectionManager` | `clientConnectionManager`
`protected StreamClientConfigurationImpl` | `configuration`
`protected org.apache.http.params.HttpParams` | `globalParams`
`protected org.apache.http.impl.client.DefaultHttpClient` | `httpClient`

Constructor Summary
`StreamClientImpl(StreamClientConfigurationImpl configuration)`

Method Summary
`protected void` | `abort(org.apache.http.client.methods.HttpUriRequest request)` Cancel and abort the request immediately, with the proprietary API.
`protected Callable<StreamResponseMessage>` | `createCallable(StreamRequestMessage requestMessage, org.apache.http.client.methods.HttpUriRequest request)` Create a callable procedure that will execute the request.
`protected org.apache.http.HttpEntity` | `createHttpRequestEntity(UpnpMessage upnpMessage)`
`protected org.apache.http.client.methods.HttpUriRequest` | `createRequest(StreamRequestMessage requestMessage)` Create a proprietary representation of this request, log warnings and return `null` if creation fails.
`protected org.apache.http.client.ResponseHandler<StreamResponseMessage>` | `createResponseHandler()`
`StreamClientConfigurationImpl` | `getConfiguration()`
`protected org.apache.http.params.HttpParams` | `getRequestParams(StreamRequestMessage requestMessage)`
`protected boolean` | `logExecutionException(Throwable t)`
`void` | `stop()` Stops the service, closes any connection pools etc.

Methods inherited from class org.fourthline.cling.transport.spi.AbstractStreamClient
`onFinally, sendRequest`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### configuration

    protected final StreamClientConfigurationImpl configuration

### clientConnectionManager

    protected final org.apache.http.impl.conn.PoolingClientConnectionManager clientConnectionManager

### httpClient

    protected final org.apache.http.impl.client.DefaultHttpClient httpClient

### globalParams

    protected final org.apache.http.params.HttpParams globalParams

Constructor Detail

### StreamClientImpl

    public StreamClientImpl(StreamClientConfigurationImpl configuration)
                     throws InitializationException

Throws:
  `InitializationException`

Method Detail

### getConfiguration

    public StreamClientConfigurationImpl getConfiguration()

  Returns:
    This service's configuration.

### createRequest

    protected org.apache.http.client.methods.HttpUriRequest createRequest(StreamRequestMessage requestMessage)

  Description copied from class: `AbstractStreamClient`
  Create a proprietary representation of this request, log warnings and return `null` if creation fails.

  Specified by:
    `createRequest` in class `AbstractStreamClient<StreamClientConfigurationImpl,org.apache.http.client.methods.HttpUriRequest>`

### createCallable

    protected Callable<StreamResponseMessage> createCallable(StreamRequestMessage requestMessage,
                                                             org.apache.http.client.methods.HttpUriRequest request)

  Description copied from class: `AbstractStreamClient`
  Create a callable procedure that will execute the request.

  Specified by:
    `createCallable` in class `AbstractStreamClient<StreamClientConfigurationImpl,org.apache.http.client.methods.HttpUriRequest>`

### abort

    protected void abort(org.apache.http.client.methods.HttpUriRequest request)

  Description copied from class: `AbstractStreamClient`
  Cancel and abort the request immediately, with the proprietary API.

  Specified by:
    `abort` in class `AbstractStreamClient<StreamClientConfigurationImpl,org.apache.http.client.methods.HttpUriRequest>`

### logExecutionException

    protected boolean logExecutionException(Throwable t)

  Specified by:
    `logExecutionException` in class `AbstractStreamClient<StreamClientConfigurationImpl,org.apache.http.client.methods.HttpUriRequest>`
  Returns:
    `true` if no more logging of this exception should be done.

### stop

    public void stop()

  Description copied from interface: `StreamClient`
  Stops the service, closes any connection pools etc.

### createHttpRequestEntity

    protected org.apache.http.HttpEntity createHttpRequestEntity(UpnpMessage upnpMessage)

### createResponseHandler

    protected org.apache.http.client.ResponseHandler<StreamResponseMessage> createResponseHandler()

### getRequestParams

    protected org.apache.http.params.HttpParams getRequestParams(StreamRequestMessage requestMessage)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2013 4th Line GmbH, Switzerland. All Rights Reserved.