public static final class ERequestFeed.ERequest extends EFeed
EReplier
to the
ERequestor
, routing replies back to the requestor.
A requestor can cancel an in-progress request by calling
close()
. Once canceled, no new replies
will be delivered to the requestor. However, in-flight
replies already scheduled for delivery will be delivered.
Note: Applications are responsible for
tracking active requests once instantiated.
ERequestFeed
does not track active requests for
the application.
Modifier and Type | Class and Description |
---|---|
protected static class |
net.sf.eBus.client.ESingleFeed.Builder<F extends net.sf.eBus.client.ESingleFeed,T extends EObject,B extends net.sf.eBus.client.ESingleFeed.Builder<F,T,?>>
Base class for single subject feeds.
|
protected static class |
net.sf.eBus.client.ESingleFeed.FeedType
Enumerates the supported feed types.
|
EFeed.AbstractClientTask, EFeed.FeedScope, EFeed.NotifyTask, EFeed.StatusTask<T extends IEFeed>
Modifier and Type | Field and Description |
---|---|
protected int |
mActivationCount
Tracks the number of contra-feeds matched to this feed.
|
protected net.sf.eBus.client.ESingleFeed.FeedType |
mFeedType
Specifies whether this is a publish, subscribe, request,
or reply feed.
|
protected net.sf.eBus.client.ESubject |
mSubject
The feed interfaces with this eBus subject.
|
FEED_IS_INACTIVE, FEED_NOT_ADVERTISED, mEClient, mFeedId, mFeedState, mInPlace, mIsActive, mScope, NO_CONDITION, NOTIFY_METHOD, NULL_CLIENT
Modifier and Type | Method and Description |
---|---|
int |
activationCount()
Returns the feed activation count.
|
void |
cancel()
Attempts to cancel this request with extant repliers.
|
void |
close()
Cancels this request immediately and unilaterally if
this action is allowed.
|
protected void |
inactivate()
If this request is still active, then automatically
cancels this request with all extant repliers.
|
EMessageKey |
key()
Returns the feed message key.
|
boolean |
mayClose()
|
java.lang.String |
messageSubject()
Returns the feed
message key subect . |
int |
repliersRemaining()
Returns the number of repliers still replying to the
request.
|
ERequestFeed.RequestState |
requestState()
Returns the request current state.
|
java.lang.String |
toString()
Returns a containing the feed message key and data member
values.
|
addAllKeys, addKey, addListener, checkScopes, clientId, createDispatcher, defaultDispatcher, eClient, equals, feedId, feedState, findKeys, findKeys, findKeys, hashCode, inPlace, isActive, isFeedUp, isOverridden, loadKeys, location, register, register, register, removeListener, scope, setExhaust, shutdown, shutdown, shutdownAll, startup, startup, startupAll, storeKeys, storeKeys, storeKeys, subclassDistance
protected final net.sf.eBus.client.ESingleFeed.FeedType mFeedType
protected final net.sf.eBus.client.ESubject mSubject
feed type
.protected int mActivationCount
protected void inactivate()
inactivate
in class EFeed
public void close()
IllegalStateException
is thrown.
Does nothing if this request is not active.
If this request may not be unilaterally canceled then it may allow for a cancel request message to be sent to the replier(s). If all repliers accept the cancel request then this request is then canceled. But if at least one replier rejects the cancel request then the request is still active.
public java.lang.String toString()
public ERequestFeed.RequestState requestState()
public int repliersRemaining()
ERequestFeed.RequestState.NOT_PLACED
or
ERequestFeed.RequestState.DONE
.public boolean mayClose()
true
if requests may be unilaterally
canceled.public void cancel()
close()
a replier may reject this
attempt at canceling the request thus keeping the
request alive. This method of terminating a request
should be preferred over close()
since it
allows the replier to respond to the cancel request.java.lang.IllegalStateException
- if this request is not active.public final EMessageKey key()
EPublishFeed
, then a
notification
message key is returned.public final java.lang.String messageSubject()
message key subect
.public final int activationCount()
Copyright © 2001 - 2024. Charles W. Rapp. All rights reserved.