|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.dpml.transit.link.Link
The Link class is a data structure that holds the target uri of a link.
It is not intended that the applications instantiates this class directly,
but obtains it as a object from the URL.getContent()
method.
Example;
URL url = new URL( "link:jar:some/opague/pointer" );
Class[] type = new Class[] { Link.class };
// Get the Link object from the URL
Link link = (Link) url.getContent( type );
// Get the URI that this link is pointing to at the moment
URI uri = link.getTargetURI();
// Change the link to point somewhere else.
URI newUri = new URI( "artifact:jar:abc/def/hoopla#3.1.2" );
link.setTargetURI( newUri );
Constructor Summary | |
Link(URI uri,
LinkManager manager)
Constructor for the Link. |
Method Summary | |
URI |
getLinkURI()
Return the link uri. |
URI |
getTargetURI(URI defaultUri)
Return the URI that is currently bound to the Link. |
void |
setTargetURI(URI uri)
Sets (and permanently remembers) the Link to point to a new URI. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Link(URI uri, LinkManager manager) throws NullArgumentException
uri
- the link physical urimanager
- the link manager
NullArgumentException
- if the link uri or manager is nullMethod Detail |
public URI getLinkURI()
public URI getTargetURI(URI defaultUri) throws IOException
defaultUri
- the default value
IOException
- if an IO error occurspublic void setTargetURI(URI uri) throws IOException
uri
- the URI that this link: should be pointing to.
IOException
- if an IO error occurs
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |