Package org.dellroad.msrp
Class MsrpUri
- java.lang.Object
-
- org.dellroad.msrp.MsrpUri
-
public class MsrpUri extends Object
Represents an MRSP URI. This class only supports URIs that have session ID's.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Set<String>getParameters()Get the URI-parameters, if any.StringgetSessionId()Get the MSRP session ID specified in this URI.StringgetTransport()Get the MSRP transport specified in this URI.URIgetUri()Get this instance as anURI.inthashCode()booleanisSecure()Determine whether this URI uses TLS.EndpointtoEndpoint()Create anEndpointcorresponding to this instance.StringtoString()
-
-
-
Constructor Detail
-
MsrpUri
public MsrpUri(String string) throws URISyntaxException
Constrcuctor.- Parameters:
string- URI in string form- Throws:
URISyntaxException- ifstringis not a valid MSRP URI
-
-
Method Detail
-
isSecure
public boolean isSecure()
Determine whether this URI uses TLS.- Returns:
- true if secured by TLS
-
getSessionId
public String getSessionId()
Get the MSRP session ID specified in this URI.- Returns:
- session ID
-
getTransport
public String getTransport()
Get the MSRP transport specified in this URI. Currently will always beMsrpConstants.TRANSPORT_TCP.- Returns:
- session transport
-
getParameters
public Set<String> getParameters()
Get the URI-parameters, if any. The returnedSetwill iterate the parameters in their original order.- Returns:
- unmodifiable set of URI-parameters, possibly empty
-
toEndpoint
public Endpoint toEndpoint()
Create anEndpointcorresponding to this instance.- Returns:
- corresponding
Endpoint
-
-