YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.share.HttpLinkTarget Class Reference

Target of a ShareRegistry.Kind#HTTP_LINK entry: an http or https link the proxy relays. More...

Collaboration diagram for de.yaacc.share.HttpLinkTarget:
Collaboration graph

Public Member Functions

RendererStateMap getRendererStates ()
 
String getUrl ()
 
boolean equals (Object o)
 
int hashCode ()
 
String toString ()
 

Static Public Member Functions

static HttpLinkTarget of (String url)
 
static boolean isFetchable (String url)
 

Static Public Attributes

static final int MAX_LENGTH = 2048
 Longer links are refused.
 

Detailed Description

Target of a ShareRegistry.Kind#HTTP_LINK entry: an http or https link the proxy relays.

The proxy never fetches anything else, so the scheme is checked when the target is built and again where it is fetched (isFetchable). Plain Java. toString() does not show the link (it may carry a token).

Member Function Documentation

◆ getRendererStates()

RendererStateMap de.yaacc.share.HttpLinkTarget.getRendererStates ( )
Returns
the bounded per-renderer state of the share (never null)

◆ getUrl()

String de.yaacc.share.HttpLinkTarget.getUrl ( )
Returns
the link, with a lower-case http or https scheme

◆ isFetchable()

static boolean de.yaacc.share.HttpLinkTarget.isFetchable ( String url)
static
Returns
true if of(String) would accept the text

Referenced by de.yaacc.upnp.UpnpClient.createPlayableItem(), de.yaacc.share.LinkContentType.find(), and de.yaacc.share.LinkTargetPolicy.isAllowedTarget().

Here is the caller graph for this function:

◆ of()

static HttpLinkTarget de.yaacc.share.HttpLinkTarget.of ( String url)
static
Parameters
urlthe link as text, may be null
Returns
the target with the scheme in lower case, or null if the text is not an http or https link with a host part, is longer than MAX_LENGTH, has leading blanks or contains whitespace or control characters

The documentation for this class was generated from the following file: