com.bea.wlrt.adapter.defaultprovider.impl
Class CSVAdapterImpl
java.lang.Object
|
+--com.bea.wlrt.ede.impl.AbstractStreamingEventSource
|
+--com.bea.wlrt.ede.impl.AbstractStage
|
+--com.bea.wlrt.ede.impl.AbstractAdapter
|
+--com.bea.wlrt.adapter.defaultprovider.impl.SocketAdapterImpl
|
+--com.bea.wlrt.adapter.defaultprovider.impl.PacketAdapterImpl
|
+--com.bea.wlrt.adapter.defaultprovider.impl.CSVAdapterImpl
- public class CSVAdapterImpl
- extends PacketAdapterImpl
Adapter that creates event objects from String data in the following format: events are
delimited by EOL or the ';' character. Each event is a set of comma-separated name-value pairs, e.g.
"property1=value1,property2=value2". The created events are of type CSVEventType.
Can be extended to create events of a different type.
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
CSVAdapterImpl
public CSVAdapterImpl(String id)
createEventObjects
protected List createEventObjects(Packet packet)
- Creates event objects from the data in the passed in packet
- Parameters:
packet
- data read from the socket connection- Returns:
- a list of event objects
- Overrides:
- createEventObjects in class PacketAdapterImpl
getEventType
protected EventType getEventType()
- May be overridden to create a different event type.
- Returns:
- default CSVEventType
parseCSVEvent
protected Map parseCSVEvent(String item)
- Parse comma-separated name-value pairs for an event
- Parameters:
item
- String containing name-value pairs- Returns:
- Map of names and associated String values
getParts
protected String[] getParts(String data,
String data_sep)
- Split a String into parts
- Parameters:
data
- the String to be splitdata_sep
- the separator- Returns:
- the parts of the original String