public class StreamConfigParser extends java.lang.Object implements StreamLookupEnvironment
Constructor and Description |
---|
StreamConfigParser(org.springframework.data.repository.CrudRepository<? extends BaseDefinition,java.lang.String> repository) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
lookupChannelForLabelOrModule(java.lang.String streamName,
java.lang.String streamOrLabelOrModuleName)
Look up an existing label or module name.
|
StreamNode |
lookupStream(java.lang.String name)
Look up a previously defined stream by name, returns the parsed AST for it.
|
StreamNode |
parse(java.lang.String stream)
Parse a stream definition without supplying the stream name up front.
|
StreamNode |
parse(java.lang.String name,
java.lang.String stream)
Parse a stream definition.
|
java.lang.String |
toString() |
public StreamConfigParser(org.springframework.data.repository.CrudRepository<? extends BaseDefinition,java.lang.String> repository)
public StreamNode parse(java.lang.String stream)
mystream = http | file
public StreamNode parse(java.lang.String name, java.lang.String stream)
StreamDefinitionException
public java.lang.String toString()
toString
in class java.lang.Object
public StreamNode lookupStream(java.lang.String name)
StreamLookupEnvironment
lookupStream
in interface StreamLookupEnvironment
name
- name of the streampublic java.lang.String lookupChannelForLabelOrModule(java.lang.String streamName, java.lang.String streamOrLabelOrModuleName)
StreamLookupEnvironment
mystream = http | foo | file
tap mystream.foo > count
will cause a lookup for stream 'mystream' module 'foo' when the tap is being resolved. The return value would be
'mystream.1' (The output channel for a module is based on the index of the module within the stream, starting at
0).lookupChannelForLabelOrModule
in interface StreamLookupEnvironment
streamName
- the name of the streamstreamOrLabelOrModuleName
- a label or name of a module