public abstract class UrlMrl extends Object implements Mrl
This class provides a fluent API for initialising the MRL, e.g.
String mrl = new WebMrl().type("http")
.host("www.myhost.com")
.port("8080")
.path("/media/example.mp4")
.value();
This will generate "http://www.myhost.com:8080/media/example.mp4".| Constructor and Description |
|---|
UrlMrl() |
| Modifier and Type | Method and Description |
|---|---|
UrlMrl |
host(String host)
Set the host name.
|
UrlMrl |
path(String path)
Set the request path.
|
UrlMrl |
port(int port)
Set the port number.
|
UrlMrl |
type(String type)
Set the URL type.
|
String |
value()
Get the media resource locator value
|
public final UrlMrl type(String type)
type - type, e.g. http or httpspublic final UrlMrl host(String host)
host - host name.public final UrlMrl port(int port)
port - port numberpublic final UrlMrl path(String path)
path - request pathCopyright © 2009–2015 Caprica Software Limited. All rights reserved.