public class RemoteClientInfo extends ClientInfo
The getExtraResponseHeaders() method offers modifiable HTTP headers which will
be added to the responses and returned to the client.
| Modifier and Type | Field and Description |
|---|---|
protected Connection |
connection |
protected UpnpHeaders |
extraResponseHeaders |
requestHeaders| Constructor and Description |
|---|
RemoteClientInfo() |
RemoteClientInfo(Connection connection,
UpnpHeaders requestHeaders) |
RemoteClientInfo(StreamRequestMessage requestMessage) |
| Modifier and Type | Method and Description |
|---|---|
Connection |
getConnection() |
UpnpHeaders |
getExtraResponseHeaders() |
InetAddress |
getLocalAddress() |
InetAddress |
getRemoteAddress() |
boolean |
isPS3Request() |
boolean |
isRequestCancelled()
Check if the remote client's connection is still open.
|
boolean |
isWMPRequest() |
boolean |
isXbox360Request() |
void |
setResponseUserAgent(String userAgent) |
void |
setResponseUserAgent(UserAgentHeader userAgentHeader) |
void |
throwIfRequestCancelled() |
String |
toString() |
getRequestHeaders, getRequestUserAgent, setRequestUserAgentprotected final Connection connection
protected final UpnpHeaders extraResponseHeaders
public RemoteClientInfo()
public RemoteClientInfo(StreamRequestMessage requestMessage)
public RemoteClientInfo(Connection connection, UpnpHeaders requestHeaders)
public Connection getConnection()
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.
true if the remote client's connection was closed.public void throwIfRequestCancelled()
throws InterruptedException
InterruptedException - if isRequestCancelled() returns true.public InetAddress getRemoteAddress()
public InetAddress getLocalAddress()
public UpnpHeaders getExtraResponseHeaders()
public void setResponseUserAgent(String userAgent)
public void setResponseUserAgent(UserAgentHeader userAgentHeader)
public boolean isWMPRequest()
public boolean isXbox360Request()
public boolean isPS3Request()
public String toString()
toString in class ClientInfoCopyright © 2023 jUPnP.org. All rights reserved.