Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Inner Class Summary
`static class` | `CSVAdapterImpl.CSVEventType`

Constructor Summary
`CSVAdapterImpl(String id)`

Method Summary
`protected List` | `createEventObjects(Packet packet)` Creates event objects from the data in the passed in packet
`protected EventType` | `getEventType()` May be overridden to create a different event type.
`protected String[]` | `getParts(String data, String data_sep)` Split a String into parts
`protected Map` | `parseCSVEvent(String item)` Parse comma-separated name-value pairs for an event

Methods inherited from class com.bea.wlrt.adapter.defaultprovider.impl.PacketAdapterImpl
`getEventDelimiter, getReadListener`

Methods inherited from class com.bea.wlrt.adapter.defaultprovider.impl.SocketAdapterImpl
`connectionCreated, getPort, getServerConnection, onEvent, setPort, setupServerConnection`

Methods inherited from class com.bea.wlrt.ede.impl.AbstractAdapter
`getEventGenerator`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CSVAdapterImpl

    public CSVAdapterImpl(String id)

Method Detail

### 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 split
    `data_sep` - the separator
  Returns:
    the parts of the original String

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD