|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bloomberglp.blpapi.AbstractSession com.bloomberglp.blpapi.Session
public class Session
This class provides a session for making requests and subscriptions to services
Sessions manage access to services either by requests and responses or subscriptions. A Session can dispatch events and replies in either a synchronous or asynchronous mode. The mode of a Session is determined when it is constructed and cannot be changed subsequently.
A Session is asynchronous if an EventHandler
object is supplied when
it is constructed. The
setEventHandler()
method may be called to adjust the way events are handled
subsequently and the AbstractSession.nextEvent()
method may not be called.
All incoming events are delivered to the EventHandler(s) supplied on
construction or subsequently using
setEventHandler()
A Session is synchronous if an EventHandler
object is not supplied
when it is constructed. The AbstractSession.nextEvent()
method must be called
to read incoming events and the
setEventHandler()
method may not be called. Several methods in Session take
a CorrelationID
parameter. The application may choose to supply its
own CorrelationID values or allow the Session to create values. If the
application supplies its own CorrelationID values it must manage their
lifetime such that the same value is not reused for more than one operation
at a time. The lifetime of a CorrelationID begins when it is supplied in a
method invoked on a Session and ends either when it is explicitly canceled
using AbstractSession.cancel(CorrelationID)
or
unsubscribe(CorrelationID)
, when a
Event.EventType.RESPONSE
Event (not a PARTIAL_RESPONSE) containing it
is received or when a Event.EventType.SUBSCRIPTION_STATUS
Event which
indicates that the subscription it refers to has been terminated is received.
When using an asynchronous Session the application must be aware that because
the callbacks are generated from another thread they may be processed before
the call which generates them has returned. For example, the
Event.EventType.SESSION_STATUS
Event generated by the
AbstractSession.startAsync()
may be processed before startAsync() has
returned (even though startAsync() itself will not block).
This becomes more significant when Session generated CorrelationIds are in
use. For example, if a call to
Subscribe()
which returns a Session generated CorrelationID
has not completed
before the first Events which contain that CorrelationID arrive the
application may not be able to interpret those events correctly. For this
reason, it is preferable to use user generated CorrelationIDs when using
asynchronous Sessions. This issue does not arise when using a synchronous
Session as long as the calls to subscribe() etc are made on the same thread
as the calls to nextEvent().
Nested Class Summary | |
---|---|
static class |
Session.SubscriptionStatus
SubscriptionStatus lists the possible statuses a Subscription may be in. |
Nested classes/interfaces inherited from class com.bloomberglp.blpapi.AbstractSession |
---|
AbstractSession.StopOption |
Constructor Summary | |
---|---|
Session()
Same as calling Session(SessionOptions(), null, null |
|
Session(SessionOptions sessionOptions)
Create a session with the specified sessionOptions |
|
Session(SessionOptions sessionOptions,
EventHandler handler)
Create a session with the specified sessionOptions and
dispatch events on this session to the specified
handler |
|
Session(SessionOptions sessionOptions,
EventHandler eventHandler,
EventDispatcher eventDispatcher)
Create a session with the specified sessionOptions and
dispatch events on this session using the provided
dispatcher to the specified handler |
Method Summary | |
---|---|
void |
resubscribe(SubscriptionList subscriptionList)
Modify each subscription in the specified subscriptionList to reflect the modified options specified for it. |
void |
resubscribe(SubscriptionList subscriptionList,
int resubId)
Modify each subscription in the specified subscriptionList to reflect the modified options specified for it. |
void |
resubscribe(SubscriptionList subscriptionList,
int resubId,
java.lang.String requestLabel)
Modify each subscription in the specified subscriptionList to reflect the modified options specified for it. |
void |
resubscribe(SubscriptionList subscriptionList,
java.lang.String requestLabel)
Modify each subscription in the specified subscriptionList to reflect the modified options specified for it. |
CorrelationID |
sendRequest(Request request,
CorrelationID correlationId)
Send the specified request to a service using this session |
CorrelationID |
sendRequest(Request request,
CorrelationID correlationId,
java.lang.String requestLabel)
Send the specified request to a service using this session |
CorrelationID |
sendRequest(Request request,
EventQueue eventQueue,
CorrelationID correlationId)
Send the specified request to a service using this session |
CorrelationID |
sendRequest(Request request,
EventQueue eventQueue,
CorrelationID correlationId,
java.lang.String requestLabel)
Send the specified request to a service using this session |
CorrelationID |
sendRequest(Request request,
Identity identity,
CorrelationID correlationId)
Send the specified request to a service using this session |
CorrelationID |
sendRequest(Request request,
Identity identity,
CorrelationID correlationId,
java.lang.String requestLabel)
Send the specified request to a service using this session |
CorrelationID |
sendRequest(Request request,
Identity identity,
EventQueue eventQueue,
CorrelationID correlationId)
Send the specified request to a service using this session |
CorrelationID |
sendRequest(Request request,
Identity identity,
EventQueue eventQueue,
CorrelationID correlationId,
java.lang.String requestLabel)
Send the specified request to a service using this session |
CorrelationID |
sendRequest(Request request,
UserHandle identity,
CorrelationID correlationId)
Deprecated. as of 3.3.0, use sendRequest(Request, Identity, CorrelationID)
instead |
CorrelationID |
sendRequest(Request request,
UserHandle identity,
CorrelationID correlationId,
java.lang.String requestLabel)
Deprecated. as of 3.3.0, use sendRequest(Request, Identity, CorrelationID, String)
instead |
CorrelationID |
sendRequest(Request request,
UserHandle identity,
EventQueue eventQueue,
CorrelationID correlationId)
Deprecated. as of 3.3.0, use sendRequest(Request, Identity, EventQueue, CorrelationID)
instead |
CorrelationID |
sendRequest(Request request,
UserHandle identity,
EventQueue eventQueue,
CorrelationID correlationId,
java.lang.String requestLabel)
Deprecated. as of 3.3.0, use sendRequest(Request, Identity, EventQueue, CorrelationID, String)
instead |
void |
setEventHandler(EventHandler eventHandler,
Event.EventType eventType)
Set event specific event handlers |
void |
subscribe(SubscriptionList subscriptionList)
Initiate a request to receive asynchronous updates to the specified topics. |
void |
subscribe(SubscriptionList subscriptionList,
Identity identity)
Initiate a request to receive asynchronous updates to the specified topics. |
void |
subscribe(SubscriptionList subscriptionList,
Identity identity,
java.lang.String requestLabel)
Initiate a request to receive asynchronous updates to the specified topics in the subscriptionList . |
void |
subscribe(SubscriptionList subscriptionList,
java.lang.String requestLabel)
Initiate a request to receive asynchronous updates to the specified topics. |
void |
subscribe(SubscriptionList subscriptionList,
UserHandle Identity)
Deprecated. as of 3.3.0, use subscribe(SubscriptionList, Identity) instead |
void |
subscribe(SubscriptionList subscriptionList,
UserHandle identity,
java.lang.String requestLabel)
Deprecated. as of 3.3.0, use subscribe(SubscriptionList, Identity, String)
instead |
SubscriptionIterator |
subscriptionIterator()
Returns an an iterator for iterating over the subscriptions. |
int |
subscriptionStatus(CorrelationID correlationId)
Returns the subscription status for the specified correlationId |
java.lang.String |
subscriptionString(CorrelationID correlationId)
Returns the subscription string for the specified correlationId |
void |
unsubscribe(CorrelationID correlationId)
Deprecated. as of 3.2.2 Use AbstractSession.cancel(CorrelationID) instead |
void |
unsubscribe(SubscriptionList subscriptionList)
Cancel previous requests for asynchronous topic updates associated with the correlation ids listed in the specified subscriptionList |
void |
unsubscribe(SubscriptionList subscriptionList,
java.lang.String requestLabel)
Cancel previous requests for asynchronous topic updates associated with the correlation ids listed in the specified subscriptionList |
Methods inherited from class com.bloomberglp.blpapi.AbstractSession |
---|
cancel, cancel, cancel, cancel, createIdentity, createUserHandle, generateToken, generateToken, generateToken, getService, nextEvent, nextEvent, openService, openServiceAsync, openServiceAsync, sendAuthorizationRequest, sendAuthorizationRequest, sendAuthorizationRequest, sendAuthorizationRequest, sendAuthorizationRequest, sendAuthorizationRequest, sendAuthorizationRequest, sendAuthorizationRequest, start, startAsync, stop, stop, tryNextEvent |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Session()
Session(SessionOptions(), null, null
public Session(SessionOptions sessionOptions)
sessionOptions
Same as calling
Session(sessionOptions, null, null)
public Session(SessionOptions sessionOptions, EventHandler handler)
sessionOptions
and
dispatch events on this session
to the specified
handler
Same as calling
Session(sessionOptions, handler, null
public Session(SessionOptions sessionOptions, EventHandler eventHandler, EventDispatcher eventDispatcher)
sessionOptions
and
dispatch events on this session
using the provided
dispatcher
to the specified handler
See SessionOptions
for information on what options can be
specified
If the specified eventHandler is not null then this Session will operate in asynchronous mode, otherwise the Session will operate in Synchronous mode.
If eventDispatcher is null then the Session will create a default
EventDispatcher
for this Session which will use a single thread
for dispatching events. For more control over event dispatching a
specific instance of EventDispatcher
can be supplied. This can be
used to share a single EventDispatcher
among multiple Session
objects
If an eventDispatcher is supplied which uses more than one thread the Session will ensure that events which should be ordered are passed to callbacks in a correct order. For example, updates to a single subscription
Each EventDispatcher
uses it's own thread or pool of threads so
if you want to ensure that a session which receives very large messages
and takes a long time to process them does not delay a session that
receives small messages and processes each one very quickly then give
each one a separate EventDispatcher
.
sessionOptions
- values in SessionOptions are used for configuring this sessioneventHandler
- the event handler to which all events are deliveredeventDispatcher
- The dispatcher to be used for dispatching events.Method Detail |
---|
public void subscribe(SubscriptionList subscriptionList) throws java.io.IOException
same as calling subscribe(subscriptionList, null, null
subscriptionList
- the list of subscription strings to subscribe
java.lang.IllegalStateException
- if the session is not established
DuplicateCorrelationIDException
- if any of the correlationIds specified in the
subscriptionList is not unique
java.io.IOException
- if there is any communication error on subscribepublic void subscribe(SubscriptionList subscriptionList, java.lang.String requestLabel) throws java.io.IOException
same as calling subscribe(subscriptionList, null, requestLabel
subscriptionList
- the list of subscription strings to subscriberequestLabel
- defines a string which will be recorded along with any
diagnostics for this operation.
java.lang.IllegalStateException
- if the session is not established
DuplicateCorrelationIDException
- if any of the correlationIds specified in the
subscriptionList is not unique
java.io.IOException
- if there is any communication error on subscribepublic void subscribe(SubscriptionList subscriptionList, Identity identity) throws java.io.IOException
same as calling subscribe(subscriptionList, identity, null
subscriptionList
- the list of subscription strings to subscribeidentity
- the handle to the user for whom this subscription is being
initiated
java.lang.IllegalStateException
- if the session is not established
DuplicateCorrelationIDException
- if any of the correlationIds specified in the
subscriptionList is not unique
java.io.IOException
- if there is any communication error on subscribe
java.lang.IllegalArgumentException
- if the specified Identity was not created through this
Sessionpublic void subscribe(SubscriptionList subscriptionList, UserHandle Identity) throws java.io.IOException
subscribe(SubscriptionList, Identity)
instead
java.io.IOException
public void subscribe(SubscriptionList subscriptionList, Identity identity, java.lang.String requestLabel) throws java.io.IOException
subscriptionList
.
Once this has method has returned any subscriptions in the specified
subscriptionList which were not given a application generated
CorrelationID
will have a session generated CorrelationID set.
Multiple subscriptions to the same subscriptionString are valid and each
will have their own, unique CorrelationID. This method should only be
called after the Session has successfully started up. If an exception is
thrown none of the subscriptions in the list would have been processed.
If a identity
is specified then the subscribe request is
issued on behalf of the user represented by the handle. Use the
sendAuthorizationRequest
to authorize an user for accessing the
specified service
Upon completion of this request a
Event.EventType.SUBSCRIPTION_STATUS
event will be published for
each topic in the subscription list containing a message with the result
for one topic. A "SubscriptionStarted" message will be generated if the
subscription was successfully initiated. If the subscription fails for
any topic a "SubscriptionFailure" message containing the failure reason
will be generated
identity
- the handle to the user for whom this subscription is being
initiatedrequestLabel
- defines a string which will be recorded along with any
diagnostics for this operation.
java.lang.IllegalStateException
- if the session is not established
DuplicateCorrelationIDException
- if any of the correlationIds specified in the
subscriptionList is not unique
java.io.IOException
- if there is any communication error on subscribe
java.lang.IllegalArgumentException
- if the specified Identity was not created through this
Sessionpublic void subscribe(SubscriptionList subscriptionList, UserHandle identity, java.lang.String requestLabel) throws java.io.IOException
subscribe(SubscriptionList, Identity, String)
instead
java.io.IOException
public void resubscribe(SubscriptionList subscriptionList) throws java.io.IOException
Same as calling resubscribe(subscriptionList, null)
subscriptionList
- a list of active subscriptions whose options need to be
changed
NotFoundException
- If any of the CorrelationIDs specified in the
subscriptionList is not a valid subscription
java.io.IOException
- if there is any communication error on reSubscribe
java.lang.IllegalStateException
- if the session is not establishedpublic void resubscribe(SubscriptionList subscriptionList, int resubId) throws java.io.IOException
Same as calling resubscribe(subscriptionList, resubId, null)
subscriptionList
- a list of active subscriptions whose options need to be
changedresubId
- an integer that identifies this request and appears in the
SUBSCRIPTION_STATUS
event
NotFoundException
- If any of the CorrelationIDs specified in the
subscriptionList is not a valid subscription
java.io.IOException
- if there is any communication error on reSubscribe
java.lang.IllegalStateException
- if the session is not establishedpublic void resubscribe(SubscriptionList subscriptionList, java.lang.String requestLabel) throws java.io.IOException
For each entry in the subscriptionList the CorrelationID
identifies a current "active" subscription the modified options replace
the current options for the subscription and a
Event.EventType.SUBSCRIPTION_STATUS
event will be generated in
the event stream before the first update based on the new options.
subscriptionList
- a list of active subscriptions whose options need to be
changedrequestLabel
- defines a string which will be recorded along with any
diagnostics for this operation.
NotFoundException
- If any of the CorrelationIDs specified in the
subscriptionList is not a valid subscription
java.io.IOException
- if there is any communication error on reSubscribe
java.lang.IllegalStateException
- if the session is not establishedpublic void resubscribe(SubscriptionList subscriptionList, int resubId, java.lang.String requestLabel) throws java.io.IOException
For each entry in the subscriptionList the CorrelationID
identifies a current "active" subscription the modified options replace
the current options for the subscription and a
Event.EventType.SUBSCRIPTION_STATUS
event will be generated in
the event stream before the first update based on the new options. The event will contain
a message with the specified 'resubId'.
subscriptionList
- a list of active subscriptions whose options need to be
changedresubId
- an integer that identifies this request and appears in the
SUBSCRIPTION_STATUS
eventrequestLabel
- defines a string which will be recorded along with any
diagnostics for this operation.
NotFoundException
- If any of the CorrelationIDs specified in the
subscriptionList is not a valid subscription
java.io.IOException
- if there is any communication error on reSubscribe
java.lang.IllegalStateException
- if the session is not establishedpublic void unsubscribe(CorrelationID correlationId) throws java.io.IOException
AbstractSession.cancel(CorrelationID)
instead
correlationId
- the correlationId of the subscription that is to be
unsubscribed
java.io.IOException
- if any IO error occurs while unsubscribingpublic void unsubscribe(SubscriptionList subscriptionList) throws java.io.IOException
This operation provides a convenience for cancelling Subscriptions using
a SubscriptionList
.
See AbstractSession.cancel(List, String)
operation for more information on the
handling of cancel requests and other important notes.
subscriptionList
- list of correlationIds of subscriptions that are to be
unsubscribed
java.io.IOException
- if any IO error occurs while unsubscribingpublic void unsubscribe(SubscriptionList subscriptionList, java.lang.String requestLabel) throws java.io.IOException
This operation provides a convenience for cancelling Subscriptions using
a SubscriptionList
.
See AbstractSession.cancel(List, String)
operation for more information on the
handling of cancel requests and other important notes.
subscriptionList
- list of correlationIds of subscriptions that are to be
unsubscribedrequestLabel
- defines a string which will be recorded along with any
diagnostics for this operation.
java.io.IOException
- if any IO error occurs while unsubscribingpublic int subscriptionStatus(CorrelationID correlationId)
correlationId
- the correlation id for which the subscription status is
required
NotFoundException
- if the specified correlationId has no associated subscriptionpublic java.lang.String subscriptionString(CorrelationID correlationId)
correlationId
- the correlation id for which the subscription string is
required
NotFoundException
- if the specified correlationId has no associated subscriptionpublic CorrelationID sendRequest(Request request, CorrelationID correlationId) throws java.io.IOException
Same as calling
sendRequest(Request, Identity, EventQueue, CorrelationID, String)
with a null identity, EventQueue and a null request label string
parameter
request
- Filled in request that needs to be sent to the servicecorrelationId
- The correlationId to be used to match the response
java.lang.IllegalStateException
- If the session is not established
InvalidRequestException
- If the request is not compliant with the schema for the
request
RequestQueueOverflowException
- If this session has too many enqueued requests
java.io.IOException
- If any error occurs while sending the request
DuplicateCorrelationIDException
- If the specified correlationId is already active for this
Sessionpublic CorrelationID sendRequest(Request request, CorrelationID correlationId, java.lang.String requestLabel) throws java.io.IOException
Same as calling
sendRequest(Request, Identity, EventQueue, CorrelationID, String)
with a null identity and EventQueue
request
- Filled in request that needs to be sent to the servicecorrelationId
- The correlationId to be used to match the responserequestLabel
- defines a string which will be recorded along with any
diagnostics for this operation.
java.lang.IllegalStateException
- If the session is not established
InvalidRequestException
- If the request is not compliant with the schema for the
request
RequestQueueOverflowException
- If this session has too many enqueued requests
java.io.IOException
- If any error occurs while sending the request
DuplicateCorrelationIDException
- If the specified correlationId is already active for this
Sessionpublic CorrelationID sendRequest(Request request, Identity identity, CorrelationID correlationId) throws java.io.IOException
Same as calling
sendRequest(Request, Identity, EventQueue, CorrelationID, String)
with a null EventQueue and a null request label string parameter
request
- Filled in request that needs to be sent to the serviceidentity
- handle to the user whose privileges are to be used for this
requestcorrelationId
- The correlationId to be used to match the response
java.lang.IllegalStateException
- If the session is not established
InvalidRequestException
- If the request is not compliant with the schema for the
request
RequestQueueOverflowException
- If this session has too many enqueued requests
java.io.IOException
- If any error occurs while sending the request
DuplicateCorrelationIDException
- If the specified correlationId is already active for this
Session
java.lang.IllegalArgumentException
- if the specified Identity was not created through this
Sessionpublic CorrelationID sendRequest(Request request, UserHandle identity, CorrelationID correlationId) throws java.io.IOException
sendRequest(Request, Identity, CorrelationID)
instead
java.io.IOException
public CorrelationID sendRequest(Request request, Identity identity, CorrelationID correlationId, java.lang.String requestLabel) throws java.io.IOException
Same as calling
sendRequest(Request, Identity, EventQueue, CorrelationID, String)
with a null EventQueue
request
- Filled in request that needs to be sent to the serviceidentity
- handle to the user whose privileges are to be used for this
requestcorrelationId
- The correlationId to be used to match the responserequestLabel
- defines a string which will be recorded along with any
diagnostics for this operation.
java.lang.IllegalStateException
- If the session is not established
InvalidRequestException
- If the request is not compliant with the schema for the
request
RequestQueueOverflowException
- If this session has too many enqueued requests
java.io.IOException
- If any error occurs while sending the request
DuplicateCorrelationIDException
- If the specified correlationId is already active for this
Session
java.lang.IllegalArgumentException
- if the specified Identity was not created through this
Sessionpublic CorrelationID sendRequest(Request request, UserHandle identity, CorrelationID correlationId, java.lang.String requestLabel) throws java.io.IOException
sendRequest(Request, Identity, CorrelationID, String)
instead
java.io.IOException
public CorrelationID sendRequest(Request request, EventQueue eventQueue, CorrelationID correlationId) throws java.io.IOException
Same as calling
sendRequest(Request, Identity, EventQueue, CorrelationID, String)
with a null identity and a null request label string parameter
request
- Filled in request that needs to be sent to the serviceeventQueue
- to be used to receive response events for this requestcorrelationId
- The correlationId to be used to match the response
java.lang.IllegalStateException
- If the session is not established
InvalidRequestException
- If the request is not compliant with the schema for the
request
RequestQueueOverflowException
- If this session has too many enqueued requests
java.io.IOException
- If any error occurs while sending the request
DuplicateCorrelationIDException
- If the specified correlationId is already active for this
Sessionpublic CorrelationID sendRequest(Request request, EventQueue eventQueue, CorrelationID correlationId, java.lang.String requestLabel) throws java.io.IOException
Same as calling
sendRequest(Request, Identity, EventQueue, CorrelationID, String)
with a null identity
request
- Filled in request that needs to be sent to the serviceeventQueue
- to be used to receive response events for this requestcorrelationId
- The correlationId to be used to match the responserequestLabel
- defines a string which will be recorded along with any
diagnostics for this operation.
java.lang.IllegalStateException
- If the session is not established
InvalidRequestException
- If the request is not compliant with the schema for the
request
RequestQueueOverflowException
- If this session has too many enqueued requests
java.io.IOException
- If any error occurs while sending the request
DuplicateCorrelationIDException
- If the specified correlationId is already active for this
Sessionpublic CorrelationID sendRequest(Request request, Identity identity, EventQueue eventQueue, CorrelationID correlationId) throws java.io.IOException
Same as calling
sendRequest(Request, Identity, EventQueue, CorrelationID, String)
with a null request label string parameter
request
- Filled in request that needs to be sent to the serviceidentity
- handle to the user whose privileges are to be used for this
requesteventQueue
- to be used to receive response events for this requestcorrelationId
- The correlationId to be used to match the response
java.lang.IllegalStateException
- If the session is not established
InvalidRequestException
- If the request is not compliant with the schema for the
request
RequestQueueOverflowException
- If this session has too many enqueued requests
java.io.IOException
- If any error occurs while sending the request
DuplicateCorrelationIDException
- If the specified correlationId is already active for this
Session
java.lang.IllegalArgumentException
- if the specified Identity was not created through this
Sessionpublic CorrelationID sendRequest(Request request, UserHandle identity, EventQueue eventQueue, CorrelationID correlationId) throws java.io.IOException
sendRequest(Request, Identity, EventQueue, CorrelationID)
instead
java.io.IOException
public CorrelationID sendRequest(Request request, Identity identity, EventQueue eventQueue, CorrelationID correlationId, java.lang.String requestLabel) throws java.io.IOException
This method sends the specified request to a service that is available on this session. The specified correlationId is returned on the response and can be used to correlate the response to this request. If a null correlationId is specified then an internal CorrelationID is generated and returned.
If a valid identity
is specified then it used as
authorization for the specified request. If a valid identity is not
specified then the request runs with the default authorization.
sendAuthorizationRequest
for more information
If an eventQueue is specified then all response events for this Request are published to this eventQueue. The user can block on this event queue for response and can use this as a mechanism to convert this asynchronous request into a synchronous request
A successful request will generate zero or more
Event.EventType.PARTIAL_RESPONSE
events followed by exactly one
Event.EventType.RESPONSE
event. Once the final RESPONSE event has
been received the CorrelationID
associated with this request may
be re-used. If the request fails at any stage a
Event.EventType.REQUEST_STATUS
event will be generated after
which the CorrelationId associated with the request may be re-used.
request
- Filled in request that needs to be sent to the serviceidentity
- handle to the user whose privileges are to be used for this
requesteventQueue
- to be used to receive response events for this requestcorrelationId
- The correlationId to be used to match the responserequestLabel
- defines a string which will be recorded along with any
diagnostics for this operation.
java.lang.IllegalStateException
- If the session is not established
InvalidRequestException
- If the request is not compliant with the schema for the
request
RequestQueueOverflowException
- If this session has too many enqueued requests
java.io.IOException
- If any error occurs while sending the request
DuplicateCorrelationIDException
- If the specified correlationId is already active for this
Session
java.lang.IllegalArgumentException
- if the specified Identity was not created through this
Sessionpublic CorrelationID sendRequest(Request request, UserHandle identity, EventQueue eventQueue, CorrelationID correlationId, java.lang.String requestLabel) throws java.io.IOException
sendRequest(Request, Identity, EventQueue, CorrelationID, String)
instead
java.io.IOException
public void setEventHandler(EventHandler eventHandler, Event.EventType eventType)
eventHandler
- new event handler to replace default event handler provided at
constructioneventType
- type of events to be delivered to the new handlerpublic SubscriptionIterator subscriptionIterator()
Returns an an iterator for iterating over the subscriptions in this session. Note that the returned subscriptions have no defined order.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |