|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bloomberglp.blpapi.Service
public abstract class Service
Defines a service which provides access to API data.
A Service object is obtained from a Session
and contains the
Operations (each of which contains its own schema) and the schema for Events
which this Service may produce. A Service object is also used to create
Request objects used with a Session
to issue requests.
All data delivered via the API is associated with a service. Before accessing data using the API using either request-reply or subscription, the appropriate Service must be opened and, if necessary, authorized.
Method Summary | |
---|---|
abstract java.lang.String |
authorizationServiceName()
Return the name of the Service which must be used in order to authorize access to restricted operations on this Service. |
abstract Event |
createAdminEvent()
Deprecated. as of 3.7.0, use createPublishEvent() instead
Create an Admin Event suitable for publishing to this Service.
Use an EventFormatter to add Messages to the Event and set fields. |
abstract Request |
createAuthorizationRequest()
Return an empty Request object to be used for authorization. |
abstract Event |
createPublishEvent()
Create an Event suitable for publishing to this Service. |
abstract Request |
createRequest(java.lang.String operationName)
Return an empty Request object for the specified operation. |
abstract Event |
createResponseEvent(CorrelationID correlationId)
Create a response Event to answer the request. |
abstract SchemaElementDefinition |
getEventDefinition(int index)
Return the SchemaElementDefinition of the event of this Service
at the specified index |
abstract SchemaElementDefinition |
getEventDefinition(Name name)
Return the SchemaElementDefinition of the event of this Service
with the specified name |
abstract SchemaElementDefinition |
getEventDefinition(java.lang.String name)
Return the SchemaElementDefinition of the event of this Service
with the specified name |
abstract Operation |
getOperation(int index)
Return the Operation of this Service at the specified index. |
abstract Operation |
getOperation(Name name)
Return the Operation of this service having the specified name |
abstract Operation |
getOperation(java.lang.String name)
Return the Operation of this service having the specified name |
abstract java.lang.String |
name()
Return a string which contains the name of this Service |
abstract int |
numEventDefinitions()
Return the number of unsolicited events defined by this Service |
abstract int |
numOperations()
Return the number of Operations defined by this Service |
abstract void |
print(java.io.OutputStream output)
Prints the schema of this service to OutputStream. |
abstract void |
print(java.io.Writer writer)
Prints the schema of this service to Writer. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public abstract java.lang.String name()
public abstract int numOperations()
public abstract Operation getOperation(int index)
Operation
of this Service at the specified index.
java.lang.IndexOutOfBoundsException
- if index >=
numOperations()
public abstract Operation getOperation(java.lang.String name)
Operation
of this service having the specified name
NotFoundException
- if an operation with the specified name cannot
be foundpublic abstract Operation getOperation(Name name)
Operation
of this service having the specified name
NotFoundException
- if an operation with the specified name cannot
be foundpublic abstract int numEventDefinitions()
public abstract SchemaElementDefinition getEventDefinition(int index)
SchemaElementDefinition
of the event of this Service
at the specified index
java.lang.IndexOutOfBoundsException
- if index >=
numEventDefinitions()
public abstract SchemaElementDefinition getEventDefinition(java.lang.String name)
SchemaElementDefinition
of the event of this Service
with the specified name
NotFoundException
- if an event definition with the specified name
cannot be foundpublic abstract SchemaElementDefinition getEventDefinition(Name name)
SchemaElementDefinition
of the event of this Service
with the specified name
NotFoundException
- if an event definition with the specified name
cannot be foundpublic abstract java.lang.String authorizationServiceName()
If no authorization is required to access operations on this service an empty string is returned. Authorization services never require authorization to use.
public abstract Request createRequest(java.lang.String operationName)
An application must populate the Request before issuing it using
Session.sendRequest()
NotFoundException
- if an Operation with the specified name could
not be found.public abstract Request createAuthorizationRequest()
An application must populate the Request before using it with
Session.sendAuthorizationRequest()
Note that this method can be called only on authorization services. This method will throw a NotFoundException if this Service does not provide an AuthorizationRequest operation. The request created by this method can be used for authorizing users to receive data from other Services that require this authorization
NotFoundException
- if this service does not have an
AuthorizationRequest Operationpublic abstract void print(java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public abstract void print(java.io.Writer writer) throws java.io.IOException
java.io.IOException
public abstract Event createPublishEvent()
Event
suitable for publishing to this Service.
Use an EventFormatter
to add Messages to the Event
and set fields.
public abstract Event createAdminEvent()
createPublishEvent()
instead
Create an Admin Event suitable for publishing to this Service.
Use an EventFormatter to add Messages to the Event and set fields.
public abstract Event createResponseEvent(CorrelationID correlationId)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |