org.fourthline.cling.model.profile
Class RemoteClientInfo
java.lang.Object
org.fourthline.cling.model.profile.ClientInfo
org.fourthline.cling.model.profile.RemoteClientInfo
public class RemoteClientInfo
- extends ClientInfo
Encapsulates information about a remote control point, the client.
The getExtraResponseHeaders()
method offers modifiable HTTP headers which will
be added to the responses and returned to the client.
- Author:
- Christian Bauer
connection
protected final Connection connection
extraResponseHeaders
protected final UpnpHeaders extraResponseHeaders
RemoteClientInfo
public RemoteClientInfo()
RemoteClientInfo
public RemoteClientInfo(StreamRequestMessage requestMessage)
RemoteClientInfo
public RemoteClientInfo(Connection connection,
UpnpHeaders requestHeaders)
getConnection
public Connection getConnection()
isRequestCancelled
public boolean isRequestCancelled()
Check if the remote client's connection is still open.
How connection checking is actually performed is transport-implementation dependent. Usually,
the StreamServer
will send meaningless heartbeat
data to the client on its (open) socket. If that fails, the client's connection has been
closed. Note that some HTTP clients can NOT handle such garbage data in HTTP
responses, hence calling this method might cause compatibility issues.
- Returns:
true
if the remote client's connection was closed.
throwIfRequestCancelled
public void throwIfRequestCancelled()
throws InterruptedException
- Throws:
InterruptedException
- if isRequestCancelled()
returns true
.
getRemoteAddress
public InetAddress getRemoteAddress()
getLocalAddress
public InetAddress getLocalAddress()
getExtraResponseHeaders
public UpnpHeaders getExtraResponseHeaders()
setResponseUserAgent
public void setResponseUserAgent(String userAgent)
setResponseUserAgent
public void setResponseUserAgent(UserAgentHeader userAgentHeader)
isWMPRequest
public boolean isWMPRequest()
isXbox360Request
public boolean isXbox360Request()
isPS3Request
public boolean isPS3Request()
toString
public String toString()
- Overrides:
toString
in class ClientInfo
Copyright © 2013 4th Line GmbH, Switzerland. All Rights Reserved.