|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.artima.place.URLFactory
Jini service that produces a URL or array of URLs. This service can be used to wrap existing file-based resources in a network mobile service object. An appropriate service UI can then be used to present the file to a user.
If this service produces an array of URLs, each URL must represent a different way to access the same resource. If a network partition, crashed server, or some other problem prevents the first URL from being successfully used, the second URL can be tried. If that one doesn't work, the third can be tried, and so on.
Constructor Summary | |
URLFactory(URLString url)
Creates a URLFactory with passed String URL. |
|
URLFactory(URLString[] urls)
Construct a URLFactory with an array of
URLString s. |
Method Summary | |
int |
getLength()
Returns the number of URLs contained in this URLFactory . |
ServicePresenter |
getServicePresenter()
Gets the ServicePresenter for this
Presentable service. |
URLString |
getURL()
Returns the first URLString in the list of
URLStrings contained in this URLFactory . |
URLString[] |
getURLs()
Returns an array containing in order the URLStrings
contained in this URLFactory . |
java.util.List |
getURLsAsList()
Returns a List of the URLStrings . |
void |
setServicePresenter(ServicePresenter servicePresenter)
Sets the ServicePresenter . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public URLFactory(URLString url)
URLFactory
with passed String
URL.url
- the URL to be contained in this URLFactory
NullPointerException
- if passed url
reference is
null
public URLFactory(URLString[] urls)
URLFactory
with an array of
URLString
s.urls
- the URLs to be contained in this URLFactory
NullPointerException
- if passed urls
array is
null
java.lang.IllegalArgumentException
- if passed urls
array is
emptyMethod Detail |
public URLString getURL()
URLString
in the list of
URLStrings
contained in this URLFactory
.URLString
in the list.public URLString[] getURLs()
URLStrings
contained in this URLFactory
.URLStrings
, in order, contained in this
URLFactory
.public java.util.List getURLsAsList()
List
of the URLStrings
.
Returns a List
containing in order the
URLStrings
contained in this URLFactory
.URLStrings
, in order, contained in this
URLFactory
.public int getLength()
URLFactory
.URLFactory
.public ServicePresenter getServicePresenter()
ServicePresenter
for this
Presentable
service. This method will return the object
passed to the setServicePresenter
method in its most
recent invocation. If the setServicePresenter
method has
not yet been invoked, this method will return the default
ServicePresenter
returned by the
ServicePresenter.getDefault
method.
This method could be called by a service or client UI for a
Presentable
service, when the UI detects that the user
wishes to activate a link. The UI can delegate the actual activation
activation of that link to the ServicePresenter
returned
by this method.
getServicePresenter
in interface Presentable
ServicePresenter
to which this service may
wish to delegate link activationspublic void setServicePresenter(ServicePresenter servicePresenter)
ServicePresenter
. This method would usually be
invoked by the client to pass in a the service presenter context
object to the Presentable
service, before attaching a
service or client UI.setServicePresenter
in interface Presentable
presenter
- the ServicePresenter
to which this
service may wish to delegate link activations
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |