com.bea.wlrt.ede
Interface StreamingDataSourceConnector


public interface StreamingDataSourceConnector
extends Adapter

A StreamingDataSourceConnector is a connection to a data source that generates streaming data. For example, this could be a financial market data feed handler.


Inner classes inherited from class com.bea.wlrt.ede.Schedulable
Schedulable.Parameter
 
Method Summary
 void closeConnection(int sessionId, Map args)
          Closes the adapter connection with the data stream.
 String getName()
          Gets the Adapter Descriptive name
 Map getProperties()
          Provides the map of all the adapter properties for a particular data stream providers.
 String getProperty(String propertyName)
          This provides the value for a given property name.
 boolean isConnected()
          Return true if the adapter is currently connected to the data stream provider.
 int openSession(Map args)
          This methods establishes the link, between the adapter and the data stream provider.
 void setProperties(Map propertySet)
          This method provides help to setup the all the properties for a adapter.
 void setProperty(String propertyName, String propertyValue)
          This method helps to set value for a given property.
 void subscribe(int sessionId, List subscriptions)
          List of subscriptions that the adapter is interested in listening from the data stream. e.g.
 void subscribe(int sessionId, List subscriptions, StreamingEventListener subscriber)
          List of subscriptions that the adapter is interested in listening from the data stream. e.g.
 void unsubscribe(int sessionId, List subscriptions)
          Unsubscribe the subscriptions
 
Methods inherited from interface com.bea.wlrt.ede.Adapter
getEventGenerator
 
Methods inherited from interface com.bea.wlrt.ede.Stage
destroy, getId, getResourceManager, getStatsManager
 
Methods inherited from interface com.bea.wlrt.ede.Schedulable
addParameter, getParameters, removeParameter
 
Methods inherited from interface com.bea.wlrt.ede.StreamingEventSource
addStreamingEventListener, getStreamingEventListeners, removeStreamingEventListener
 
Methods inherited from interface com.bea.wlrt.ede.StreamingEventListener
onEvent
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getName

public String getName()
Gets the Adapter Descriptive name


openSession

public int openSession(Map args)
                throws InstantiationException
This methods establishes the link, between the adapter and the data stream provider. The arguments to start the stream are provided as a set of map values. If the connection could not be established, then exception is raised. Once the connection is setup, isConnected() should return true;


getProperties

public Map getProperties()
Provides the map of all the adapter properties for a particular data stream providers.


setProperties

public void setProperties(Map propertySet)
This method provides help to setup the all the properties for a adapter. The property set could be different from the ones that were used to establish the initial connection


getProperty

public String getProperty(String propertyName)
                   throws IllegalArgumentException
This provides the value for a given property name. If the property does not exists appropriate exception is thrown


setProperty

public void setProperty(String propertyName,
                        String propertyValue)
                 throws IllegalArgumentException
This method helps to set value for a given property.


isConnected

public boolean isConnected()
Return true if the adapter is currently connected to the data stream provider. A false value is returned if the adapter/data stream connection is not established/broken


subscribe

public void subscribe(int sessionId,
                      List subscriptions)
               throws SubscriptionException,
                      IllegalArgumentException
List of subscriptions that the adapter is interested in listening from the data stream. e.g. "RSF.REC.IBM.N"


subscribe

public void subscribe(int sessionId,
                      List subscriptions,
                      StreamingEventListener subscriber)
               throws SubscriptionException,
                      IllegalArgumentException
List of subscriptions that the adapter is interested in listening from the data stream. e.g. "RSF.REC.IBM.N"


unsubscribe

public void unsubscribe(int sessionId,
                        List subscriptions)
                 throws SubscriptionException,
                        IllegalArgumentException
Unsubscribe the subscriptions


closeConnection

public void closeConnection(int sessionId,
                            Map args)
                     throws IllegalArgumentException
Closes the adapter connection with the data stream. The arguments to close the connection could be passed via the map. Appropriate exception would be raised if it fails to close the connection. This will also cleanup any resources that might have been obtained, when the connection was established.