org.wso2.carbon.databridge.agent.thrift.internal.publisher.client
Class ThriftEventPublisher
java.lang.Object
org.wso2.carbon.databridge.agent.thrift.internal.publisher.client.EventPublisher
org.wso2.carbon.databridge.agent.thrift.internal.publisher.client.ThriftEventPublisher
- All Implemented Interfaces:
- Runnable
public class ThriftEventPublisher
- extends EventPublisher
The publisher who sends all the arrived events to the Agent Server using a pool of threads
|
Method Summary |
protected org.wso2.carbon.databridge.commons.thrift.data.ThriftEventBundle |
convertToEventBundle(Object eventBundle,
org.wso2.carbon.databridge.commons.Event event,
String sessionId)
|
protected String |
defineStream(Object client,
String sessionId,
String streamDefinition)
|
protected boolean |
deleteStream(Object client,
String currentSessionId,
String streamId)
|
protected boolean |
deleteStream(Object client,
String currentSessionId,
String streamName,
String streamVersion)
|
protected String |
findStreamId(Object client,
String currentSessionId,
String name,
String version)
|
protected int |
getNumberOfEvents(Object eventBundle)
|
protected String |
getSessionId(Object eventBundle)
|
protected void |
setSessionId(Object eventBundle,
String sessionId)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThriftEventPublisher
public ThriftEventPublisher(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)
getNumberOfEvents
protected int getNumberOfEvents(Object eventBundle)
- Specified by:
getNumberOfEvents in class EventPublisher
convertToEventBundle
protected org.wso2.carbon.databridge.commons.thrift.data.ThriftEventBundle convertToEventBundle(Object eventBundle,
org.wso2.carbon.databridge.commons.Event event,
String sessionId)
- Specified by:
convertToEventBundle in class EventPublisher
setSessionId
protected void setSessionId(Object eventBundle,
String sessionId)
- Specified by:
setSessionId in class EventPublisher
getSessionId
protected String getSessionId(Object eventBundle)
- Specified by:
getSessionId in class EventPublisher
defineStream
protected String defineStream(Object client,
String sessionId,
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
- Specified by:
defineStream in class EventPublisher
- 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
findStreamId
protected String findStreamId(Object client,
String currentSessionId,
String name,
String version)
throws org.wso2.carbon.databridge.commons.exception.SessionTimeoutException,
EventPublisherException
- Specified by:
findStreamId in class EventPublisher
- Throws:
org.wso2.carbon.databridge.commons.exception.SessionTimeoutException
EventPublisherException
deleteStream
protected boolean deleteStream(Object client,
String currentSessionId,
String streamId)
throws EventPublisherException,
org.wso2.carbon.databridge.commons.exception.SessionTimeoutException
- Specified by:
deleteStream in class EventPublisher
- Throws:
EventPublisherException
org.wso2.carbon.databridge.commons.exception.SessionTimeoutException
deleteStream
protected boolean deleteStream(Object client,
String currentSessionId,
String streamName,
String streamVersion)
throws EventPublisherException,
org.wso2.carbon.databridge.commons.exception.SessionTimeoutException
- Specified by:
deleteStream in class EventPublisher
- Throws:
EventPublisherException
org.wso2.carbon.databridge.commons.exception.SessionTimeoutException
Copyright © 2015 WSO2. All rights reserved.