|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.artima.place.ServicePresenter
Contains a method that allows clients to request that the service host
present a service to the user. The passed Link
is activated
by the host, so that the host can give the user feedback about the activation
progress. The host can, for example, show an animation, status messages,
progress bar, etc., during the activation of the Link
.
Field Summary | |
static int |
DEFAULT_ACTIVATION_TIMEOUT
The default maximum activation time is 30 seconds. |
static int |
DEFAULT_SINGLE_REQUEST_TIMEOUT
The default network request timeout is 20 seconds. |
Constructor Summary | |
ServicePresenter()
Construct a ServicePresenter . |
Method Summary | |
static int |
getActivationTimeout()
Returns the recommended activation timeout. |
static ServicePresenter |
getDefault()
Gets the default ServicePresenter object. |
static int |
getSingleRequestTimeout()
Returns the recommended single request timeout. |
abstract void |
presentService(Link link)
Presents a service to a user. |
static void |
setLatencyTimeouts(int singleRequestTimeout,
int activationTimeout)
Sets the two recommended latency timeouts: the single request timeout and the activation timeout. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_ACTIVATION_TIMEOUT
getMaxActivationTime
will return if it is not
explicitly set by the client via setMaxActivationTime
.public static final int DEFAULT_SINGLE_REQUEST_TIMEOUT
getNetworkRequestTimeout
will return if it is not
explicitly set by the client via
setNetworkRequestTimeout
.Constructor Detail |
public ServicePresenter()
ServicePresenter
.Method Detail |
public static void setLatencyTimeouts(int singleRequestTimeout, int activationTimeout)
Link activations may use the single request timeout in deciding when to stop attempting to contact a particular server on the network. This value may be used, for example, if the link has several alternative servers that would yield the same service. If one is down (hasn't been reached within the single request timeout), the link could give up on that server and try the next in line. Link activations are not in any way required to use this value.
Link activations may use the activation timeout in deciding when to declare that an activation has failed due to no or slow response on the network. Link activations are not in any way required to use this value.
singleRequestTimeout
- the recommended single request timeout,
expressed in millisecondsactivationTimeout
- the recommended activation timeout,
expressed in millisecondsjava.lang.IllegalArgumentException
- if either of passed
activationTimeout
or
singleRequestTimeout
is less than or equal to zero,
or if singleRequestTimeout
is greater than
activationTimeout
public static int getActivationTimeout()
setLatencyTimeouts
method to reflect user preferences
and observed network latency. Link activations are not in any way
required to use this value.public static int getSingleRequestTimeout()
public abstract void presentService(Link link)
link
- the Link
that, when activated, will produce a
service to present to the user.public static ServicePresenter getDefault()
ServicePresenter
object.ServicePresenter
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |