public abstract class EventPublisher extends Object implements Runnable
| Constructor and Description |
|---|
EventPublisher(EventQueue<org.wso2.carbon.databridge.commons.Event> eventQueue,
org.apache.commons.pool.impl.GenericKeyedObjectPool transportPool,
Semaphore queueSemaphore,
int maxMessageBundleSize,
DataPublisherConfiguration dataPublisherConfiguration,
AgentAuthenticator agentAuthenticator,
ThreadPoolExecutor threadPool) |
| Modifier and Type | Method and Description |
|---|---|
void |
attemptReconnection(int reconnectionTime,
String sessionId) |
protected abstract org.wso2.carbon.databridge.commons.thrift.data.ThriftEventBundle |
convertToEventBundle(Object eventBundle,
org.wso2.carbon.databridge.commons.Event event,
String sessionId) |
protected abstract String |
defineStream(Object client,
String currentSessionId,
String streamDefinition) |
String |
defineStream(String sessionId,
String streamDefinition) |
protected abstract boolean |
deleteStream(Object client,
String currentSessionId,
String streamId) |
protected abstract boolean |
deleteStream(Object client,
String currentSessionId,
String streamName,
String streamVersion) |
boolean |
deleteStream(String sessionId,
String streamId) |
boolean |
deleteStream(String sessionId,
String streamName,
String streamVersion) |
protected abstract String |
findStreamId(Object client,
String currentSessionId,
String name,
String version) |
String |
findStreamId(String sessionId,
String name,
String version) |
protected abstract int |
getNumberOfEvents(Object eventBundle) |
protected abstract String |
getSessionId(Object eventBundle) |
void |
registerReceiverStateObserver(ReceiverStateObserver stateObserver) |
void |
run() |
protected abstract void |
setSessionId(Object eventBundle,
String reconnect) |
public EventPublisher(EventQueue<org.wso2.carbon.databridge.commons.Event> eventQueue, org.apache.commons.pool.impl.GenericKeyedObjectPool transportPool, Semaphore queueSemaphore, int maxMessageBundleSize, DataPublisherConfiguration dataPublisherConfiguration, AgentAuthenticator agentAuthenticator, ThreadPoolExecutor threadPool)
public void registerReceiverStateObserver(ReceiverStateObserver stateObserver)
protected abstract int getNumberOfEvents(Object eventBundle)
protected abstract org.wso2.carbon.databridge.commons.thrift.data.ThriftEventBundle convertToEventBundle(Object eventBundle, org.wso2.carbon.databridge.commons.Event event, String sessionId)
public String defineStream(String sessionId, String streamDefinition) throws AgentException, org.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedException, org.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionException, org.wso2.carbon.databridge.commons.exception.StreamDefinitionException
AgentExceptionorg.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedExceptionorg.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionExceptionorg.wso2.carbon.databridge.commons.exception.StreamDefinitionExceptionprotected abstract String defineStream(Object client, String currentSessionId, String streamDefinition) throws org.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedException, org.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionException, EventPublisherException, org.wso2.carbon.databridge.commons.exception.SessionTimeoutException, org.wso2.carbon.databridge.commons.exception.StreamDefinitionException
org.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedExceptionorg.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionExceptionEventPublisherExceptionorg.wso2.carbon.databridge.commons.exception.SessionTimeoutExceptionorg.wso2.carbon.databridge.commons.exception.StreamDefinitionExceptionpublic String findStreamId(String sessionId, String name, String version) throws AgentException
AgentExceptionprotected abstract String findStreamId(Object client, String currentSessionId, String name, String version) throws org.wso2.carbon.databridge.commons.exception.SessionTimeoutException, EventPublisherException
org.wso2.carbon.databridge.commons.exception.SessionTimeoutExceptionEventPublisherExceptionpublic boolean deleteStream(String sessionId, String streamId) throws AgentException
AgentExceptionprotected abstract boolean deleteStream(Object client, String currentSessionId, String streamId) throws EventPublisherException, org.wso2.carbon.databridge.commons.exception.SessionTimeoutException
EventPublisherExceptionorg.wso2.carbon.databridge.commons.exception.SessionTimeoutExceptionpublic boolean deleteStream(String sessionId, String streamName, String streamVersion) throws AgentException
AgentExceptionprotected abstract boolean deleteStream(Object client, String currentSessionId, String streamName, String streamVersion) throws EventPublisherException, org.wso2.carbon.databridge.commons.exception.SessionTimeoutException
EventPublisherExceptionorg.wso2.carbon.databridge.commons.exception.SessionTimeoutExceptionpublic void attemptReconnection(int reconnectionTime,
String sessionId)
Copyright © 2015 WSO2. All rights reserved.