|
|||||||||
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.ProviderSession
public final class ProviderSession
This class provides a session that can be used for providing services.
ProviderSession inherits from AbstractSession. In addition to the AbstractSession functionality, a ProviderSession provides the following functions to applications.
Applications can register to provide Services using either
registerService(java.lang.String, com.bloomberglp.blpapi.Identity)
or
registerServiceAsync(java.lang.String, com.bloomberglp.blpapi.Identity)
. Before registering to provide
a Service an application must have established its identity.
After applications have registered a service they will start receiving
subscription requests ('TopicSubscribed' message in Event.EventType.TOPIC_STATUS
) for topics which belong to the service. If
the resolver has specified 'subServiceCode' for topics in
'PermissionResponse', then only providers who have activated the
'subServiceCode' will get the subscription request. Where multiple providers
have registered the same service and sub-service code (if any), the provider
that registered the highest priority for the sub-service code will receive
subscription requests; if multiple providers have registered the same
sub-service code with the same priority (or the resolver did not set a
sub-service code for the subscription), the subscription request will be
routed to one of the providers with the highest service priority.
Topic Life Cycle
A provider wishing to publish subscription data must explicitly open each
topic on which they publish using createTopics(com.bloomberglp.blpapi.TopicList)
(or
createTopicsAsync(com.bloomberglp.blpapi.TopicList)
). Creating a topic prepares the
distribution and caching infrastructure for new data associated with the
topic's resolved identifier. (Note that several different topics could
resolve to the same ID.) Independent of a topic's creation status is its
subscription status, i.e. whether there are subscribers ready to receive the
data published. A topic that is both created and subscribed is *activated*.
There are two models for managing topic creation: broadcast and interactive.
Broadcast publishers proactively call createTopics(com.bloomberglp.blpapi.TopicList)
)
for each topic on which they intend to publish, while interactive publishers
wait to receive a 'TopicSubscribed' message (within an Event
of type
Event.EventType.TOPIC_STATUS
before calling
createTopics(com.bloomberglp.blpapi.TopicList)
in response. Topics are resolved before
they are created---it is possible that multiple different topic strings will
map to the same underlying topic. See below for the behavior of the SDK when
the same topic is created multiple times.
After createTopics(com.bloomberglp.blpapi.TopicList)
is called, the publisher will
receive a 'TopicCreated' message (within a
Event.EventType.TOPIC_STATUS
event), and when there is at least one
subscriber to the topic the publisher will then receive a 'TopicActivated'
message (also within an Event.EventType.TOPIC_STATUS
event). As
subscribers come and go, additional 'TopicSubscribed', 'TopicActivated',
'TopicUnsubscribed', and 'TopicDeactivated' messages may be received by the
publisher. A Topic
object can be retrieved from each of these
messages using the getTopic(com.bloomberglp.blpapi.Message)
method, and this object
can be used for subsequent calls to EventFormatter.appendMessage(java.lang.String, com.bloomberglp.blpapi.Topic)
and
deleteTopic(com.bloomberglp.blpapi.Topic)
. In the case that the same resolved
topic is created multiple times by a publisher using different names, it is
unspecified which of those names will be returned by
Message.topicName()
for these (or other) messages.
If a publisher no longer intends to publish data on a topic, it can call
deleteTopic(com.bloomberglp.blpapi.Topic)
to free the internal caching and
distribution resources associated with the topic. When a resolved topic has
been deleted the same number of times that it has been created, a
'TopicDeleted' message will be delivered, preceded by 'TopicUnsubscribed'
and 'TopicDeactivated' messages if the topic was still subscribed (and
activated). No further messages can be published on a deleted topic.
Deregistering a service deletes all topics associated with that service.
Note that 'TopicActivated' and 'TopicDeactivated' messages are entirely redundant with 'TopicCreated', 'TopicSubscribed', 'TopicDeleted', and 'TopicUnsubscribed' messages, and are provided only for the convenience of publishers that do not maintain per-topic state.
Nested Class Summary | |
---|---|
static class |
ProviderSession.ResolveMode
|
Nested classes/interfaces inherited from class com.bloomberglp.blpapi.AbstractSession |
---|
AbstractSession.StopOption |
Constructor Summary | |
---|---|
ProviderSession()
|
|
ProviderSession(SessionOptions options)
|
|
ProviderSession(SessionOptions options,
ProviderEventHandler eventHandler)
|
|
ProviderSession(SessionOptions options,
ProviderEventHandler eventHandler,
EventDispatcher dispatcher)
Construct a Session using the optionally specified 'options', the optionally specified 'eventHandler' and the optionally specified 'eventDispatcher'. |
Method Summary | |
---|---|
void |
activateSubServiceCodeRange(java.lang.String serviceName,
int begin,
int end,
int priority)
Registers to receive, with the specified 'priority', subscriptions for the specified 'serviceName' that the resolver has mapped to a service code between the specified 'begin' and the specified 'end' values, inclusive. |
Topic |
createTopic(Message message)
Deprecated. as of 3.4.0, use createTopicsAsync(TopicList, ResolveMode, Identity)
or createTopics(TopicList, ResolveMode,
Identity) instead
Creates a new Topic object based on the specified 'message'. The
'message' must be one of the following types: TOPIC_STATUS or
RESOLUTION_STATUS. Returns null if the 'message' was not
valid. |
void |
createTopics(TopicList topicList)
Creates the topics in the specified 'topicList' and updates the 'topicList' with the results of the resolution and creation process. |
void |
createTopics(TopicList topicList,
ProviderSession.ResolveMode resolveMode)
Create the topics in the specified 'topicList' and updates the 'topicList' with the results of the resolution process. |
void |
createTopics(TopicList topicList,
ProviderSession.ResolveMode resolveMode,
Identity providerIdentity)
Create the topics in the specified 'topicList' and updates the 'topicList' with the results of the resolution process. |
void |
createTopicsAsync(TopicList topicList)
Begin the creation of the topics in the specified 'topicList'.All the services referenced in the topics in the 'topicList' must already have been registered using registerService(). |
void |
createTopicsAsync(TopicList topicList,
ProviderSession.ResolveMode resolveMode)
Begin the creation of the topics in the specified 'topicList'. |
void |
createTopicsAsync(TopicList topicList,
ProviderSession.ResolveMode resolveMode,
Identity providerIdentity)
Begin the creation of the topics in the specified 'topicList'. |
void |
deactivateSubServiceCodeRange(java.lang.String serviceName,
int begin,
int end)
De-registers to receive subscriptions for the specified 'serviceName' that the resolver has mapped to a service code between the specified 'begin' and the specified 'end' values, inclusive. |
void |
deleteTopic(Topic topic)
Removes one reference from the specified 'topic'. |
void |
deleteTopics(java.util.List<Topic> topics)
Deletes each topic in the specified 'topics'. |
boolean |
deregisterService(java.lang.String serviceName)
Deregisters the service identified by the specified 'serviceName'. |
Topic |
getTopic(Message message)
Finds a previously created Topic object based on the
specified message. |
void |
publish(Event event)
Publish the specified 'event'. |
boolean |
registerService(java.lang.String serviceName,
Identity providerIdentity)
Attempts to register the service identified by the specified serviceName and blocks until the service is either registered
successfully or has failed to be registered. |
boolean |
registerService(java.lang.String serviceName,
Identity providerIdentity,
ServiceRegistrationOptions registrationOptions)
Attempts to register the service identified by the specified serviceName using the optionally specified
registrationOptions and block until the service is either
registered successfully or has failed to be registered. |
CorrelationID |
registerServiceAsync(java.lang.String serviceName,
Identity providerIdentity)
Begins the process of registering the service identified by the specified serviceName and returns immediately. |
CorrelationID |
registerServiceAsync(java.lang.String serviceName,
Identity providerIdentity,
CorrelationID correlationId)
Begins the process of registering the service identified by the specified serviceName and returns immediately. |
CorrelationID |
registerServiceAsync(java.lang.String serviceName,
Identity providerIdentity,
CorrelationID correlationId,
ServiceRegistrationOptions registrationOptions)
Is registerServiceAsync extended. |
CorrelationID |
registerServiceAsync(java.lang.String serviceName,
Identity providerIdentity,
ServiceRegistrationOptions registrationOptions)
Is registerServiceAsync extended. |
void |
resolve(ResolutionList resolutionList)
Resolves the topics in the specified 'resolutionList' and updates the 'resolutionList' with the results of the resolution process. |
void |
resolve(ResolutionList resolutionList,
ProviderSession.ResolveMode resolveMode)
Resolves the topics in the specified 'resolutionList' and updates the 'resolutionList' with the results of the resolution process. |
void |
resolve(ResolutionList resolutionList,
ProviderSession.ResolveMode resolveMode,
Identity providerIdentity)
Resolves the topics in the specified 'resolutionList' and updates the 'resolutionList' with the results of the resolution process. |
void |
resolveAsync(ResolutionList resolutionList)
Begin the resolution of the topics in the specified 'resolutionList'.All the services referenced in the topics in the 'resolutionList' must already have been registered using registerService(). |
void |
resolveAsync(ResolutionList resolutionList,
ProviderSession.ResolveMode resolveMode)
Begin the resolution of the topics in the specified 'resolutionList'. |
void |
resolveAsync(ResolutionList resolutionList,
ProviderSession.ResolveMode resolveMode,
Identity providerIdentity)
Begin the resolution of the topics in the specified 'resolutionList'. |
void |
sendResponse(Event event)
Send the response event for previously received request |
void |
sendResponse(Event event,
boolean isPartialResponse)
Send the response event for previously received request |
void |
setEventHandler(ProviderEventHandler eventHandler,
Event.EventType eventType)
Set event specific event handlers |
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 ProviderSession()
public ProviderSession(SessionOptions options)
public ProviderSession(SessionOptions options, ProviderEventHandler eventHandler)
public ProviderSession(SessionOptions options, ProviderEventHandler eventHandler, EventDispatcher dispatcher)
See the SessionOptions documentation for details on what can be specified in the 'options'.
If 'eventHandler' is not null then this Session will operation 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 amongst 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, partial response to a request or updates to a single subscription.
If 'eventHandler' is null and the 'eventDispatcher' is not null an exception is thrown.
Each EventDispatcher uses its 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.
Method Detail |
---|
public boolean registerService(java.lang.String serviceName, Identity providerIdentity) throws java.lang.InterruptedException
serviceName
and blocks until the service is either registered
successfully or has failed to be registered. The specified
providerIdentity
is used to verify permissions to provide the
service being registered. Returns true
if the service is
registered successfully and false
if the service cannot be
registered successfully.
If the service has events, registers to be able to publish events; if the service has operations, registers to be able to provide responses to incoming service requests; if the service is not contribution and defines subscriber resolution, registers subscriber resolution to able to provide responses to incoming topic permission requests.
The serviceName
must begin with a full qualified service name.
That is it must begin with "//<namespace>/<service-name>[/]"
. Any portion of the serviceName
after the service name is
ignored.
This function does not return until a Event.EventType.SERVICE_STATUS
event has been generated. Note that if the session was created in
asynchronous mode, the event may be processed before the function
returns.
* @throws IllegalStateException if the session is not established
java.lang.InterruptedException
public boolean registerService(java.lang.String serviceName, Identity providerIdentity, ServiceRegistrationOptions registrationOptions) throws java.lang.InterruptedException
serviceName
using the optionally specified
registrationOptions
and block until the service is either
registered successfully or has failed to be registered. The specified
providerIdentity
is used to verify permissions to provide the
service being registered. Returns true
if the service is
registered successfully and false
if the service cannot be
registered successfully.
If the service has events, registers to be able to publish events; if the service has operations, registers to be able to provide responses to incoming service requests; if the service is not contribution and defines subscriber resolution, registers subscriber resolution to able to provide responses to incoming topic permission requests.
The serviceName
must begin with a full qualified service name.
That is it must begin with "//<namespace>/<service-name>[/]"
. Any portion of the serviceName
after the service name is
ignored.
This function does not return until a Event.EventType.SERVICE_STATUS
event has been generated. Note that if the session was created in
asynchronous mode, the event may be processed before the function
returns.
java.lang.IllegalStateException
- if the session is not established
java.lang.InterruptedException
public CorrelationID registerServiceAsync(java.lang.String serviceName, Identity providerIdentity)
serviceName
and returns immediately. The specified
providerIdentity
is used to verify permissions to provide the
service being registered.
The serviceName
must begin with a full qualified service name.
That is it must begin with "//<namespace>/<service-name>[/]"
. Any portion of the serviceName
after the service name is
ignored.
The application must monitor events for a
Event.EventType.SERVICE_STATUS
event which will be generated once the
service has been successfully registered or registration has failed.
java.lang.IllegalStateException
- if the session is not establishedpublic CorrelationID registerServiceAsync(java.lang.String serviceName, Identity providerIdentity, ServiceRegistrationOptions registrationOptions)
public CorrelationID registerServiceAsync(java.lang.String serviceName, Identity providerIdentity, CorrelationID correlationId)
serviceName
and returns immediately. The specified
providerIdentity
is used to verify permissions to provide the
service being registered. The specified correlationId
is used to
track Events generated as a result of this call.
The serviceName
must begin with a full qualified service name.
That is it must begin with "//<namespace>/<service-name>[/]"
. Any portion of the serviceName
after the service name is
ignored.
The application must monitor events for a
Event.EventType.SERVICE_STATUS
Event which will be generated once the
service has been successfully registered or registration has failed.
java.lang.IllegalStateException
- If the session is not established
DuplicateCorrelationIDException
- If the specified correlationId is currently active for this
Sessionpublic CorrelationID registerServiceAsync(java.lang.String serviceName, Identity providerIdentity, CorrelationID correlationId, ServiceRegistrationOptions registrationOptions)
public void activateSubServiceCodeRange(java.lang.String serviceName, int begin, int end, int priority)
public void deactivateSubServiceCodeRange(java.lang.String serviceName, int begin, int end)
public boolean deregisterService(java.lang.String serviceName)
Event.EventType.TOPIC_STATUS
events containing a TopicUnsubscribed message
for each subscribed topic, a TopicDeactivated message for each active
topic and a TopicDeleted for each created topic; generates EventType#Request_STATUS
events containing a RequestFailure message for
each pending incoming request; and generates a Event.EventType.SERVICE_STATUS
Event containing a ServiceDeregistered
message. All published events on topics created on this service will be
ignored after this method returns.
public void publish(Event event)
public Topic createTopic(Message message)
createTopicsAsync(TopicList, ResolveMode, Identity)
or createTopics(TopicList, ResolveMode,
Identity)
instead
Creates a new Topic object based on the specified 'message'. The
'message' must be one of the following types: TOPIC_STATUS or
RESOLUTION_STATUS. Returns null if the 'message' was not
valid.
java.lang.IllegalArgumentException
- message of wrong type used
as an argumentpublic void resolve(ResolutionList resolutionList) throws java.lang.InterruptedException
java.lang.InterruptedException
DuplicateCorrelationIDException
public void resolve(ResolutionList resolutionList, ProviderSession.ResolveMode resolveMode) throws java.lang.InterruptedException
ProviderSession.ResolveMode.DONT_REGISTER_SERVICES
then all the services referenced in the topics in the 'resolutionList'
must already have been registered using registerService(). If
'resolveMode' is ProviderSession.ResolveMode.AUTO_REGISTER_SERVICES
then the
specified 'providerIdentity' should be supplied and ProviderSession will
automatically attempt to register any services reference in the topics
in the 'resolutionList' that have not already been registered. Once
resolve() returns each entry in the 'resolutionList' will have been
updated with a new status.
Before resolve() returns one or more Event.EventType.RESOLUTION_STATUS
events and, if 'resolveMode' is
ProviderSession.ResolveMode.AUTO_REGISTER_SERVICES
, zero or more
Event.EventType.SERVICE_STATUS
events are generated. If this is an
asynchronous ProviderSession then these Events may be processed by the
registered EventHandler before resolve() has returned.
java.lang.InterruptedException
DuplicateCorrelationIDException
public void resolve(ResolutionList resolutionList, ProviderSession.ResolveMode resolveMode, Identity providerIdentity) throws java.lang.InterruptedException
ProviderSession.ResolveMode.DONT_REGISTER_SERVICES
then all the services referenced in the topics in the 'resolutionList'
must already have been registered using registerService(). If
'resolveMode' is ProviderSession.ResolveMode.AUTO_REGISTER_SERVICES
then the
specified 'providerIdentity' should be supplied and ProviderSession will
automatically attempt to register any services reference in the topics
in the 'resolutionList' that have not already been registered. Once
resolve() returns each entry in the 'resolutionList' will have been
updated with a new status.
Before resolve() returns one or more Event.EventType.RESOLUTION_STATUS
events and, if 'resolveMode' is
ProviderSession.ResolveMode.AUTO_REGISTER_SERVICES
, zero or more
Event.EventType.SERVICE_STATUS
events are generated. If this is an
asynchronous ProviderSession then these Events may be processed by the
registered EventHandler before resolve() has returned.
java.lang.InterruptedException
- if interrupted while waiting.
DuplicateCorrelationIDException
- if any of the correlationIds specified in the resolutionList
is not uniquepublic void createTopics(TopicList topicList) throws java.lang.InterruptedException
java.lang.InterruptedException
DuplicateCorrelationIDException
public void createTopics(TopicList topicList, ProviderSession.ResolveMode resolveMode) throws java.lang.InterruptedException
ProviderSession.ResolveMode.DONT_REGISTER_SERVICES
then all the
services referenced in the topics in the 'topicList' must already have
been registered using registerService(). If 'resolveMode' is
ProviderSession.ResolveMode.AUTO_REGISTER_SERVICES
, then ProviderSession will
automatically attempt to register any services reference in the topics
in the 'topicList' that have not already been registered. Once
createTopics() returns each entry in the 'topicList' will have been
updated with a new status.
Before createTopics() returns one or more Event.EventType.RESOLUTION_STATUS
events and, if 'resolveMode' is ProviderSession.ResolveMode.AUTO_REGISTER_SERVICES
, zero or more Event.EventType.SERVICE_STATUS
, zero or more Event.EventType.TOPIC_STATUS
events are generated. If this is an asynchronous ProviderSession then
these Events may be processed by the registered EventHandler before
createTopics() has returned.
java.lang.InterruptedException
DuplicateCorrelationIDException
public void createTopics(TopicList topicList, ProviderSession.ResolveMode resolveMode, Identity providerIdentity) throws java.lang.InterruptedException
ProviderSession.ResolveMode.DONT_REGISTER_SERVICES
then all the
services referenced in the topics in the 'topicList' must already have
been registered using registerService(). If 'resolveMode' is
ProviderSession.ResolveMode.AUTO_REGISTER_SERVICES
then the specified
'providerIdentity' should be supplied and ProviderSession will
automatically attempt to register any services reference in the topics
in the 'topicList' that have not already been registered. Once
createTopics() returns each entry in the 'topicList' will have been
updated with a new status.
Before createTopics() returns one or more
Event.EventType.RESOLUTION_STATUS
events and, if 'resolveMode' is
ProviderSession.ResolveMode.AUTO_REGISTER_SERVICES
, zero or more
Event.EventType.SERVICE_STATUS
, zero or more
Event.EventType.TOPIC_STATUS
events are generated. If this is an
asynchronous ProviderSession then these Events may be processed by the
registered EventHandler before createTopics() has returned.
java.lang.InterruptedException
- if interrupted while waiting.
DuplicateCorrelationIDException
- if any of the correlationIds specified in the topicList is
not uniquepublic void resolveAsync(ResolutionList resolutionList)
One or more Event.EventType.RESOLUTION_STATUS
events will be delivered
with the results of the resolution. These events may be generated before
or after resolve() returns.
DuplicateCorrelationIDException
public void resolveAsync(ResolutionList resolutionList, ProviderSession.ResolveMode resolveMode)
ProviderSession.ResolveMode.DONT_REGISTER_SERVICES
then all the services referenced in
the topics in the 'resolutionList' must already have been registered
using registerService(). If 'resolveMode' is AUTO_REGISTER_SERVICES then
the specified 'providerIdentity' should be supplied and ProviderSession
will automatically attempt to register any services reference in the
topics in the 'resolutionList' that have not already been registered.
One or more Event.EventType.RESOLUTION_STATUS
events will be delivered
with the results of the resolution. These events may be generated before
or after resolveAsync() returns. If
ProviderSession.ResolveMode.AUTO_REGISTER_SERVICES
is specified
Event.EventType.SERVICE_STATUS
events may also be generated before or
after this method returns.
DuplicateCorrelationIDException
public void resolveAsync(ResolutionList resolutionList, ProviderSession.ResolveMode resolveMode, Identity providerIdentity)
ProviderSession.ResolveMode.DONT_REGISTER_SERVICES
then all the services
referenced in the topics in the 'resolutionList' must already have been
registered using registerService(). If 'resolveMode' is
ProviderSession.ResolveMode.AUTO_REGISTER_SERVICES
then the specified
'providerIdentity' should be supplied and ProviderSession will
automatically attempt to register any services reference in the topics
in the 'resolutionList' that have not already been registered.
One or more Event.EventType.RESOLUTION_STATUS
events will be delivered
with the results of the resolution. These events may be generated before
or after this method returns. If
ProviderSession.ResolveMode.AUTO_REGISTER_SERVICES
is specified
Event.EventType.SERVICE_STATUS
events may also be generated before or
after this method returns.
DuplicateCorrelationIDException
- if any of the correlationIds specified in the resolutionList
is not uniquepublic void createTopicsAsync(TopicList topicList)
One or more Event.EventType.RESOLUTION_STATUS
events will be delivered
with the result of the resolution and zero or more
Event.EventType.TOPIC_STATUS
events may be generated before
or after createTopicsAsync() returns.
DuplicateCorrelationIDException
public void createTopicsAsync(TopicList topicList, ProviderSession.ResolveMode resolveMode)
ProviderSession.ResolveMode.DONT_REGISTER_SERVICES
then all the services referenced in the topics in the 'topicList' must
already have been registered using registerService(). If 'resolveMode'
is AUTO_REGISTER_SERVICES then the specified 'providerIdentity' should
be supplied and ProviderSession will automatically attempt to register
any services reference in the topics in the 'topicList' that have not
already been registered.
One or more Event.EventType.RESOLUTION_STATUS
and zero or more
Event.EventType.TOPIC_STATUS
events will be delivered with the result
of the resolution and creation respectively. These events may be
generated before or after createTopicsAsync() returns. If
ProviderSession.ResolveMode.AUTO_REGISTER_SERVICES
is specified
Event.EventType.SERVICE_STATUS
events may also be generated before or
after this method returns.
DuplicateCorrelationIDException
public void createTopicsAsync(TopicList topicList, ProviderSession.ResolveMode resolveMode, Identity providerIdentity)
ProviderSession.ResolveMode.DONT_REGISTER_SERVICES
then all the services referenced in the topics in the 'topicList' must
already have been registered using registerService(). If 'resolveMode'
is ProviderSession.ResolveMode.AUTO_REGISTER_SERVICES
then the specified
'providerIdentity' should be supplied and ProviderSession will
automatically attempt to register any services reference in the topics
in the 'topicList' that have not already been registered.
One or more Event.EventType.RESOLUTION_STATUS
and zero or more
Event.EventType.TOPIC_STATUS
events will be delivered with the result
of the resolution and creation respectively. These events may be
generated before or after this method returns. If
ProviderSession.ResolveMode.AUTO_REGISTER_SERVICES
is specified
Event.EventType.SERVICE_STATUS
events may also be generated before or
after this method returns.
DuplicateCorrelationIDException
- if any of the correlationIds specified in the topicList is
not uniquepublic Topic getTopic(Message message)
Topic
object based on the
specified message.
message
- - one of the following types:
TopicCreated, TopicActivated, TopicDeactivated,
TopicSubscribed, TopicUnsubscribed, TopicRecap.
Topic
, or null,
if requested topic couldn't be found
java.lang.IllegalArgumentException
- message of wrong type used
as an argumentpublic void deleteTopic(Topic topic)
createTopics(com.bloomberglp.blpapi.TopicList)
, then 'topic' is deleted: a
'TopicDeleted' message is delivered, preceded by 'TopicUnsubscribed' and
'TopicDeactivated' if 'topic' was subscribed. (See "Topic Life Cycle",
above, for additional details.) The behavior of this function is
undefined if 'topic' has already been deleted the same number of
times that it has been created. Further, the behavior is undefined if a
provider attempts to publish a message on a deleted topic.
public void deleteTopics(java.util.List<Topic> topics)
deleteTopic(Topic)
public void sendResponse(Event event)
public void sendResponse(Event event, boolean isPartialResponse)
event
- - response Event
to be sentisPartialResponse
- - flag indicating whether response is partial and additional
response events should be expectedpublic void setEventHandler(ProviderEventHandler 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 handler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |