|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wso2.carbon.databridge.agent.thrift.DataPublisher
public class DataPublisher
Publisher will maintain a single connection to a server, and define/find event streams and send events.
| Constructor Summary | |
|---|---|
DataPublisher(String receiverUrl,
String userName,
String password)
To create the Data Publisher and the respective agent to publish events For TCP protocol For secure data transfer the Authenticator URL will be the same as the Receiver URL and for normal data transfer the Authenticator ip will be the same as receiver ip but its port will be 100+ |
|
DataPublisher(String receiverUrl,
String userName,
String password,
Agent agent)
To create the Data Publisher to publish events For TCP protocol For secure data transfer the Authenticator URL will be the same as the Receiver URL and for normal data transfer the Authenticator ip will be the same as receiver ip but its port will be 100+ |
|
DataPublisher(String authenticationUrl,
String receiverUrl,
String userName,
String password)
To create the Data Publisher and the respective agent to publish events |
|
DataPublisher(String authenticationUrl,
String receiverUrl,
String userName,
String password,
Agent agent)
To create the Data Publisher and the respective agent to publish events |
|
| Method Summary | |
|---|---|
String |
defineStream(org.wso2.carbon.databridge.commons.StreamDefinition streamDefinition)
Defining stream on which events will be published by this DataPublisher |
String |
defineStream(String streamDefinition)
Defining stream on which events will be published by this DataPublisher |
boolean |
deleteStream(String streamId)
Defining stream on which events will be published by this DataPublisher |
boolean |
deleteStream(String streamName,
String streamVersion)
Defining stream on which events will be published by this DataPublisher |
String |
findStream(String name,
String version)
Deprecated. |
String |
findStreamId(String name,
String version)
Finding already existing stream's Id to publish data |
Agent |
getAgent()
to get the underlining agent |
void |
publish(org.wso2.carbon.databridge.commons.Event event)
Publishing the events to the server |
void |
publish(String streamId,
long timeStamp,
Object[] metaDataArray,
Object[] correlationDataArray,
Object[] payloadDataArray)
Publishing events to the server |
void |
publish(String streamId,
long timeStamp,
Object[] metaDataArray,
Object[] correlationDataArray,
Object[] payloadDataArray,
Map<String,String> arbitraryDataMap)
Publishing events to the server |
void |
publish(String streamId,
Object[] metaDataArray,
Object[] correlationDataArray,
Object[] payloadDataArray)
Publishing events to the server |
void |
publish(String streamId,
Object[] metaDataArray,
Object[] correlationDataArray,
Object[] payloadDataArray,
Map<String,String> arbitraryDataMap)
Publishing events to the server |
void |
registerReceiverStateObserver(ReceiverStateObserver stateObserver)
|
void |
setAgent(Agent agent)
to set the underlining agent which could be sheared by many data publishers |
void |
stop()
Disconnecting from the server |
void |
stopNow()
Disconnecting from the server |
boolean |
tryPublish(org.wso2.carbon.databridge.commons.Event event)
|
boolean |
tryPublish(String streamId,
long timestamp,
Object[] metaDataArray,
Object[] correlationDataArray,
Object[] payloadDataArray,
Map<String,String> arbitraryDataMap)
|
boolean |
tryPublish(String streamId,
Object[] metaDataArray,
Object[] correlationDataArray,
Object[] payloadDataArray,
Map<String,String> arbitraryDataMap)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataPublisher(String receiverUrl,
String userName,
String password)
throws MalformedURLException,
AgentException,
org.wso2.carbon.databridge.commons.exception.AuthenticationException,
org.wso2.carbon.databridge.commons.exception.TransportException
receiverUrl - the event receiver url
use userName - user namepassword - password
MalformedURLException
AgentException
org.wso2.carbon.databridge.commons.exception.AuthenticationException
org.wso2.carbon.databridge.commons.exception.TransportException
public DataPublisher(String authenticationUrl,
String receiverUrl,
String userName,
String password)
throws MalformedURLException,
AgentException,
org.wso2.carbon.databridge.commons.exception.AuthenticationException,
org.wso2.carbon.databridge.commons.exception.TransportException
authenticationUrl - the secure authentication url, use receiverUrl - the event receiver url
use userName - user namepassword - password
MalformedURLException
AgentException
org.wso2.carbon.databridge.commons.exception.AuthenticationException
org.wso2.carbon.databridge.commons.exception.TransportException
public DataPublisher(String receiverUrl,
String userName,
String password,
Agent agent)
throws MalformedURLException,
AgentException,
org.wso2.carbon.databridge.commons.exception.AuthenticationException,
org.wso2.carbon.databridge.commons.exception.TransportException
receiverUrl - the event receiver url
use userName - user namepassword - passwordagent - the underlining agent
MalformedURLException
AgentException
org.wso2.carbon.databridge.commons.exception.AuthenticationException
org.wso2.carbon.databridge.commons.exception.TransportException
public DataPublisher(String authenticationUrl,
String receiverUrl,
String userName,
String password,
Agent agent)
throws MalformedURLException,
AgentException,
org.wso2.carbon.databridge.commons.exception.AuthenticationException,
org.wso2.carbon.databridge.commons.exception.TransportException
authenticationUrl - the secure authentication url, use receiverUrl - the event receiver url
use userName - user namepassword - passwordagent - the underlining agent
MalformedURLException
AgentException
org.wso2.carbon.databridge.commons.exception.AuthenticationException
org.wso2.carbon.databridge.commons.exception.TransportException| Method Detail |
|---|
public void setAgent(Agent agent)
throws AgentException,
org.wso2.carbon.databridge.commons.exception.AuthenticationException,
org.wso2.carbon.databridge.commons.exception.TransportException
agent - the underlining agent
AgentException
org.wso2.carbon.databridge.commons.exception.AuthenticationException
org.wso2.carbon.databridge.commons.exception.TransportExceptionpublic Agent getAgent()
public void registerReceiverStateObserver(ReceiverStateObserver stateObserver)
public String defineStream(String streamDefinition)
throws AgentException,
org.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionException,
org.wso2.carbon.databridge.commons.exception.StreamDefinitionException,
org.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedException
streamDefinition - on json format
AgentException
org.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedException
org.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionException
org.wso2.carbon.databridge.commons.exception.StreamDefinitionException
public String defineStream(org.wso2.carbon.databridge.commons.StreamDefinition streamDefinition)
throws AgentException,
org.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionException,
org.wso2.carbon.databridge.commons.exception.StreamDefinitionException,
org.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedException
streamDefinition - on json format
AgentException
org.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedException
org.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionException
org.wso2.carbon.databridge.commons.exception.StreamDefinitionException
@Deprecated
public String findStream(String name,
String version)
throws AgentException,
org.wso2.carbon.databridge.commons.exception.StreamDefinitionException,
org.wso2.carbon.databridge.commons.exception.NoStreamDefinitionExistException
name - the stream nameversion - the version of the stream
AgentException - if client cannot publish the type definition
org.wso2.carbon.databridge.commons.exception.StreamDefinitionException
org.wso2.carbon.databridge.commons.exception.NoStreamDefinitionExistException
public String findStreamId(String name,
String version)
throws AgentException
name - the stream nameversion - the version of the stream
AgentException - if client cannot publish the type definition
public boolean deleteStream(String streamId)
throws AgentException
streamId - of the Stream
AgentException
org.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedException
org.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionException
org.wso2.carbon.databridge.commons.exception.StreamDefinitionException
public boolean deleteStream(String streamName,
String streamVersion)
throws AgentException
streamName - of the StreamstreamVersion - of the Stream
AgentException
org.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedException
org.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionException
org.wso2.carbon.databridge.commons.exception.StreamDefinitionException
public void publish(org.wso2.carbon.databridge.commons.Event event)
throws AgentException
event - the event to be published
AgentException - if client cannot publish the event
public boolean tryPublish(org.wso2.carbon.databridge.commons.Event event)
throws AgentException
AgentException
public void publish(String streamId,
Object[] metaDataArray,
Object[] correlationDataArray,
Object[] payloadDataArray)
throws AgentException
streamId - of the stream on which the events are publishedmetaDataArray - metadata array of the eventcorrelationDataArray - correlation data array of the eventpayloadDataArray - payload data array of the event
AgentException
public boolean tryPublish(String streamId,
Object[] metaDataArray,
Object[] correlationDataArray,
Object[] payloadDataArray,
Map<String,String> arbitraryDataMap)
throws AgentException
AgentException
public boolean tryPublish(String streamId,
long timestamp,
Object[] metaDataArray,
Object[] correlationDataArray,
Object[] payloadDataArray,
Map<String,String> arbitraryDataMap)
throws AgentException
AgentException
public void publish(String streamId,
Object[] metaDataArray,
Object[] correlationDataArray,
Object[] payloadDataArray,
Map<String,String> arbitraryDataMap)
throws AgentException
streamId - of the stream on which the events are publishedmetaDataArray - metadata array of the eventcorrelationDataArray - correlation data array of the eventpayloadDataArray - payload data array of the eventarbitraryDataMap - arbitrary mata (as meta.AgentException
public void publish(String streamId,
long timeStamp,
Object[] metaDataArray,
Object[] correlationDataArray,
Object[] payloadDataArray)
throws AgentException
streamId - of the stream on which the events are publishedtimeStamp - time stamp of the eventmetaDataArray - metadata array of the eventcorrelationDataArray - correlation data array of the eventpayloadDataArray - payload data array of the event
AgentException
public void publish(String streamId,
long timeStamp,
Object[] metaDataArray,
Object[] correlationDataArray,
Object[] payloadDataArray,
Map<String,String> arbitraryDataMap)
throws AgentException
streamId - of the stream on which the events are publishedtimeStamp - time stamp of the eventmetaDataArray - metadata array of the eventcorrelationDataArray - correlation data array of the eventpayloadDataArray - payload data array of the eventarbitraryDataMap - arbitrary mata (as meta.AgentExceptionpublic void stop()
public void stopNow()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||