public class DefaultBloombergSession extends Object implements BloombergSession
See the documentation of the parent class for more details.
This implementation is thread safe. Memory consistency effects: actions in a thread prior to submitting an request or subscribing to real time information happen-before actions subsequent to the access to the data returned by those requests / subscriptions.
Constructor and Description |
---|
DefaultBloombergSession() |
Modifier and Type | Method and Description |
---|---|
void |
start()
Starts a bloomberg session asynchronously.
|
void |
stop()
Closes the session.
|
<T extends RequestResult> |
submit(RequestBuilder<T> request)
Submits a request to the Bloomberg Session and returns immediately.
|
void |
subscribe(SubscriptionBuilder subscription)
Subscribes to a stream of real time update.
|
String |
toString() |
public void start() throws BloombergException
start
in interface BloombergSession
BloombergException
- if the bbcomm process is not running or could not be started, or if the session
could not be started asynchronouslyIllegalStateException
- if the session is already startedpublic void stop()
stop
in interface BloombergSession
public <T extends RequestResult> Future<T> submit(RequestBuilder<T> request)
BloombergException
- if the session or the required service could not be started or if the
request execution could not be completed
CancellationException
- if the request execution was cancelled (interrupted) before completion
submit
in interface BloombergSession
IllegalStateException
- if the start method was not called before this methodNullPointerException
- if request is nullpublic void subscribe(SubscriptionBuilder subscription)
BloombergSession
subscribe
in interface BloombergSession
subscription
- contains the parameters of the real time data that needs to be monitored.Copyright © 2013. All Rights Reserved.