|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openid4java.discovery.yadis.YadisUrl
public class YadisUrl
Wrapper class for various identifiers that are resolvable to URLs and can be used as YadisURLs with the Yadis protocol.
Field Summary | |
---|---|
private java.net.URL |
_yadisUrl
A YadisURL is a regular URL, with a couple restrictions. |
Constructor Summary | |
---|---|
YadisUrl(java.lang.String urlString)
Contructs a YadisURL from a string; assumes the string to be a URL-type identifier |
|
YadisUrl(java.net.URL urlId)
Constructs a YadisURL from a URL object; insures the schema is HTTP or HTTPS |
|
YadisUrl(XriIdentifier xriId)
Constructs a YadisURL from an XRI identifier. |
Method Summary | |
---|---|
java.net.URL |
getUrl()
Gets the URL to be used in Yadis transactions. |
private boolean |
isValid(java.net.URL url)
Validates a URL against the requirements for a YadisUrl. |
java.lang.String |
toString()
Gets a string representation of the YadisURL. |
private static java.net.URL |
urlFromString(java.lang.String urlString)
Constructs a URL object from a string; needed by the YadisURL(String) constructor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.net.URL _yadisUrl
Constructor Detail |
---|
public YadisUrl(java.lang.String urlString) throws YadisException
urlString
- URL-type identifier in string format
YadisException
- if the provided string cannot be a YadisUrlpublic YadisUrl(java.net.URL urlId) throws YadisException
urlId
- URL identifier
YadisException
- tf the URL identifier is not a valid YadisURLpublic YadisUrl(XriIdentifier xriId) throws YadisException
xriId
- The XRI identifier
YadisException
Method Detail |
---|
private static java.net.URL urlFromString(java.lang.String urlString) throws YadisException
urlString
- URL-type identifier in string format
YadisException
- if the provided string is not a valid URLprivate boolean isValid(java.net.URL url)
The URL must be absolute (the schema must be specified), and the schema must be HTTP or HTTPS.
url
- the URL to be validated
public java.net.URL getUrl()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |