public abstract class DataEndpoint extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DataEndpoint.State
Endpoint state.
|
| Constructor and Description |
|---|
DataEndpoint() |
| Modifier and Type | Method and Description |
|---|---|
protected DataEndpointConfiguration |
getDataEndpointConfiguration() |
DataEndpoint.State |
getState() |
void |
initialize(DataEndpointConfiguration dataEndpointConfiguration) |
protected abstract String |
login(Object client,
String userName,
String password)
Login to the endpoint and return the sessionId.
|
protected abstract void |
logout(Object client,
String sessionId)
Logout from the endpoint.
|
protected abstract void |
send(Object client,
List<org.wso2.carbon.databridge.commons.Event> events)
Send the list of events to the actual endpoint.
|
void |
shutdown()
Graceful shutdown until publish all the events given to the endpoint.
|
String |
toString() |
public void initialize(DataEndpointConfiguration dataEndpointConfiguration) throws DataEndpointException, DataEndpointAuthenticationException, org.wso2.carbon.databridge.commons.exception.TransportException
DataEndpointExceptionDataEndpointAuthenticationExceptionorg.wso2.carbon.databridge.commons.exception.TransportExceptionprotected abstract String login(Object client, String userName, String password) throws DataEndpointAuthenticationException
client - The client which can be used to connect to the endpoint.userName - The username which is used to login,password - The password which is required for the login operation.DataEndpointAuthenticationExceptionprotected abstract void logout(Object client, String sessionId) throws DataEndpointAuthenticationException
client - The client that is used to logout operation.sessionId - The current session Id.DataEndpointAuthenticationExceptionpublic DataEndpoint.State getState()
protected abstract void send(Object client, List<org.wso2.carbon.databridge.commons.Event> events) throws DataEndpointException, org.wso2.carbon.databridge.commons.exception.SessionTimeoutException, org.wso2.carbon.databridge.commons.exception.UndefinedEventTypeException
client - The client that can be used to send the events.events - List of events that needs to be sent.DataEndpointExceptionorg.wso2.carbon.databridge.commons.exception.SessionTimeoutExceptionorg.wso2.carbon.databridge.commons.exception.UndefinedEventTypeExceptionprotected DataEndpointConfiguration getDataEndpointConfiguration()
public void shutdown()
Copyright © 2021 WSO2. All rights reserved.