public class DataBridge extends Object implements DataBridgeSubscriberService, DataBridgeReceiverService
| Constructor and Description |
|---|
DataBridge(AuthenticationHandler authenticationHandler,
AbstractStreamDefinitionStore streamDefinitionStore,
DataBridgeConfiguration dataBridgeConfiguration) |
DataBridge(AuthenticationHandler authenticationHandler,
AbstractStreamDefinitionStore streamDefinitionStore,
String dataBridgeConfigPath) |
| Modifier and Type | Method and Description |
|---|---|
String |
defineStream(String sessionId,
String streamDefinition) |
String |
defineStream(String sessionId,
String streamDefinition,
String indexDefinition) |
boolean |
deleteStream(String sessionId,
String streamId) |
boolean |
deleteStream(String sessionId,
String streamName,
String streamVersion) |
boolean |
deleteStreamDefinition(String streamName,
String streamVersion,
int tenantId) |
String |
findStreamId(String sessionId,
String streamName,
String streamVersion) |
List<org.wso2.carbon.databridge.commons.StreamDefinition> |
getAllStreamDefinitions(int tenantId) |
List<org.wso2.carbon.databridge.commons.StreamDefinition> |
getAllStreamDefinitions(String sessionId) |
DataBridgeConfiguration |
getInitialConfig() |
List<RawDataAgentCallback> |
getRawDataSubscribers() |
org.wso2.carbon.databridge.commons.StreamDefinition |
getStreamDefinition(String streamId,
int tenantId) |
org.wso2.carbon.databridge.commons.StreamDefinition |
getStreamDefinition(String streamName,
String streamVersion,
int tenantId) |
org.wso2.carbon.databridge.commons.StreamDefinition |
getStreamDefinition(String sessionId,
String streamName,
String streamVersion) |
List<AgentCallback> |
getSubscribers() |
String |
login(String username,
String password) |
void |
logout(String sessionId) |
void |
publish(Object eventBundle,
String sessionId,
EventConverter eventConverter) |
void |
saveStreamDefinition(org.wso2.carbon.databridge.commons.StreamDefinition streamDefinition,
int tenantId) |
void |
saveStreamDefinition(String sessionId,
org.wso2.carbon.databridge.commons.StreamDefinition streamDefinition) |
void |
setInitialConfig(DataBridgeConfiguration initialConfig) |
void |
subscribe(AgentCallback agentCallback)
CEP/BAM can subscribe for Event Streams
|
void |
subscribe(RawDataAgentCallback agentCallback)
CEP/BAM can subscribe for Raw Event Streams
|
void |
subscribe(StreamAddRemoveListener streamAddRemoveListener) |
void |
unsubscribe(StreamAddRemoveListener streamAddRemoveListener) |
public DataBridge(AuthenticationHandler authenticationHandler, AbstractStreamDefinitionStore streamDefinitionStore, DataBridgeConfiguration dataBridgeConfiguration)
public DataBridge(AuthenticationHandler authenticationHandler, AbstractStreamDefinitionStore streamDefinitionStore, String dataBridgeConfigPath)
public String defineStream(String sessionId, String streamDefinition) throws org.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedException, org.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionException, org.wso2.carbon.databridge.commons.exception.SessionTimeoutException
defineStream in interface DataBridgeReceiverServiceorg.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedExceptionorg.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionExceptionorg.wso2.carbon.databridge.commons.exception.SessionTimeoutExceptionpublic String defineStream(String sessionId, String streamDefinition, String indexDefinition) throws org.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedException, org.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionException, org.wso2.carbon.databridge.commons.exception.SessionTimeoutException
defineStream in interface DataBridgeReceiverServiceorg.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedExceptionorg.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionExceptionorg.wso2.carbon.databridge.commons.exception.SessionTimeoutExceptionpublic String findStreamId(String sessionId, String streamName, String streamVersion) throws org.wso2.carbon.databridge.commons.exception.SessionTimeoutException
findStreamId in interface DataBridgeReceiverServiceorg.wso2.carbon.databridge.commons.exception.SessionTimeoutExceptionpublic boolean deleteStream(String sessionId, String streamId) throws org.wso2.carbon.databridge.commons.exception.SessionTimeoutException
deleteStream in interface DataBridgeReceiverServiceorg.wso2.carbon.databridge.commons.exception.SessionTimeoutExceptionpublic boolean deleteStream(String sessionId, String streamName, String streamVersion) throws org.wso2.carbon.databridge.commons.exception.SessionTimeoutException
deleteStream in interface DataBridgeReceiverServiceorg.wso2.carbon.databridge.commons.exception.SessionTimeoutExceptionpublic void publish(Object eventBundle, String sessionId, EventConverter eventConverter) throws org.wso2.carbon.databridge.commons.exception.UndefinedEventTypeException, org.wso2.carbon.databridge.commons.exception.SessionTimeoutException
publish in interface DataBridgeReceiverServiceorg.wso2.carbon.databridge.commons.exception.UndefinedEventTypeExceptionorg.wso2.carbon.databridge.commons.exception.SessionTimeoutExceptionpublic String login(String username, String password) throws org.wso2.carbon.databridge.commons.exception.AuthenticationException
login in interface DataBridgeReceiverServiceorg.wso2.carbon.databridge.commons.exception.AuthenticationExceptionpublic void logout(String sessionId) throws Exception
logout in interface DataBridgeReceiverServiceExceptionpublic DataBridgeConfiguration getInitialConfig()
getInitialConfig in interface DataBridgeReceiverServicepublic void setInitialConfig(DataBridgeConfiguration initialConfig)
public void subscribe(AgentCallback agentCallback)
subscribe in interface DataBridgeSubscriberServiceagentCallback - callbacks of the subscriberspublic void subscribe(RawDataAgentCallback agentCallback)
subscribe in interface DataBridgeSubscriberServiceagentCallback - callbacks of the subscriberspublic org.wso2.carbon.databridge.commons.StreamDefinition getStreamDefinition(String sessionId, String streamName, String streamVersion) throws org.wso2.carbon.databridge.commons.exception.SessionTimeoutException, StreamDefinitionNotFoundException, StreamDefinitionStoreException
getStreamDefinition in interface DataBridgeReceiverServiceorg.wso2.carbon.databridge.commons.exception.SessionTimeoutExceptionStreamDefinitionNotFoundExceptionStreamDefinitionStoreExceptionpublic List<org.wso2.carbon.databridge.commons.StreamDefinition> getAllStreamDefinitions(String sessionId) throws org.wso2.carbon.databridge.commons.exception.SessionTimeoutException
getAllStreamDefinitions in interface DataBridgeReceiverServiceorg.wso2.carbon.databridge.commons.exception.SessionTimeoutExceptionpublic void saveStreamDefinition(String sessionId, org.wso2.carbon.databridge.commons.StreamDefinition streamDefinition) throws org.wso2.carbon.databridge.commons.exception.SessionTimeoutException, StreamDefinitionStoreException, org.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedException
saveStreamDefinition in interface DataBridgeReceiverServiceorg.wso2.carbon.databridge.commons.exception.SessionTimeoutExceptionStreamDefinitionStoreExceptionorg.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedExceptionpublic org.wso2.carbon.databridge.commons.StreamDefinition getStreamDefinition(String streamName, String streamVersion, int tenantId) throws StreamDefinitionNotFoundException, StreamDefinitionStoreException
getStreamDefinition in interface StreamDefinitionStoreStreamDefinitionNotFoundExceptionStreamDefinitionStoreExceptionpublic org.wso2.carbon.databridge.commons.StreamDefinition getStreamDefinition(String streamId, int tenantId) throws StreamDefinitionNotFoundException, StreamDefinitionStoreException
getStreamDefinition in interface StreamDefinitionStoreStreamDefinitionNotFoundExceptionStreamDefinitionStoreExceptionpublic List<org.wso2.carbon.databridge.commons.StreamDefinition> getAllStreamDefinitions(int tenantId)
getAllStreamDefinitions in interface StreamDefinitionStorepublic void saveStreamDefinition(org.wso2.carbon.databridge.commons.StreamDefinition streamDefinition,
int tenantId)
throws org.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedException,
StreamDefinitionStoreException
saveStreamDefinition in interface StreamDefinitionStoreorg.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedExceptionStreamDefinitionStoreExceptionpublic boolean deleteStreamDefinition(String streamName, String streamVersion, int tenantId)
deleteStreamDefinition in interface StreamDefinitionStorepublic List<AgentCallback> getSubscribers()
getSubscribers in interface DataBridgeSubscriberServicepublic List<RawDataAgentCallback> getRawDataSubscribers()
getRawDataSubscribers in interface DataBridgeSubscriberServicepublic void subscribe(StreamAddRemoveListener streamAddRemoveListener)
subscribe in interface DataBridgeReceiverServicesubscribe in interface StreamDefinitionStorepublic void unsubscribe(StreamAddRemoveListener streamAddRemoveListener)
unsubscribe in interface DataBridgeReceiverServiceunsubscribe in interface StreamDefinitionStoreCopyright © 2015 WSO2. All rights reserved.