public interface Pipeline<K,V>
| 限定符和类型 | 方法和说明 |
|---|---|
Pipeline<K,V> |
addAfter(String baseName,
String name,
Command<K,V> command)
Inserts a
Command after an existing command of this pipeline. |
Pipeline<K,V> |
addBefore(String baseName,
String name,
Command<K,V> command)
Inserts a
Command before an existing command of this pipeline. |
Pipeline<K,V> |
addFirst(String name,
Command<K,V> command)
Inserts a
PipelineProcess at the first position of this pipeline. |
Pipeline<K,V> |
addLast(String name,
Command<K,V> command)
Appends a
PipelineProcess at the last position of this pipeline. |
PipelineProcess<K,V> |
context(Class<? extends Command> commandType)
Returns the context object of the
Command of the
specified type in this pipeline. |
PipelineProcess<K,V> |
context(Command<K,V> command)
Returns the context object of the specified
Command in this pipeline. |
PipelineProcess<K,V> |
context(String name)
Returns the context object of the
Command with the
specified name in this pipeline. |
Pipeline |
fireEvent(Context<K,V> context,
CompletableFuture<?> future) |
Pipeline |
fireExceptionCaught(Context<K,V> context,
Throwable cause,
CompletableFuture<?> future) |
Command<K,V> |
first()
Returns the first
Command in this pipeline. |
PipelineProcess<K,V> |
firstContext()
Returns the context of the first
Command in this pipeline. |
<T extends Command<K,V>> |
get(Class<T> commandType)
Returns the
Command of the specified type in this pipeline. |
Command<K,V> |
get(String name)
Returns the
Command with the specified name in this pipeline. |
Command<K,V> |
last()
Returns the last
Command in this pipeline. |
PipelineProcess<K,V> |
lastContext()
Returns the context of the last
Command in this pipeline. |
List<String> |
names()
Returns the
List of the command names. |
Command<K,V> |
remove(Class commandType)
Removes the
Command of the specified type from this pipeline. |
Pipeline<K,V> |
remove(Command<K,V> command)
Removes the specified
Command from this pipeline. |
Command<K,V> |
remove(String name)
Removes the
Command with the specified name from this pipeline. |
Command<K,V> |
removeFirst()
Removes the first
Command in this pipeline. |
Command<K,V> |
removeLast()
Removes the last
Command in this pipeline. |
Map<String,Command<K,V>> |
toMap()
Converts this pipeline into an ordered
Map whose keys are
command names and whose values are commands. |
Pipeline<K,V> addFirst(String name, Command<K,V> command)
PipelineProcess at the first position of this pipeline.name - the name of the command to insert firstcommand - the command to insert firstIllegalArgumentException - if there's an entry with the same name already in the pipelineNullPointerException - if the specified command is nullPipeline<K,V> addLast(String name, Command<K,V> command)
PipelineProcess at the last position of this pipeline.name - the name of the command to appendcommand - the command to appendIllegalArgumentException - if there's an entry with the same name already in the pipelineNullPointerException - if the specified command is nullPipeline<K,V> addBefore(String baseName, String name, Command<K,V> command)
Command before an existing command of this pipeline.baseName - the name of the existing commandname - the name of the command to insert beforecommand - the command to insert beforeNoSuchElementException - if there's no such entry with the specified baseNameIllegalArgumentException - if there's an entry with the same name already in the pipelineNullPointerException - if the specified baseName or command is nullPipeline<K,V> addAfter(String baseName, String name, Command<K,V> command)
Command after an existing command of this pipeline.baseName - the name of the existing commandname - the name of the command to insert aftercommand - the command to insert afterNoSuchElementException - if there's no such entry with the specified baseNameIllegalArgumentException - if there's an entry with the same name already in the pipelineNullPointerException - if the specified baseName or command is nullPipeline<K,V> remove(Command<K,V> command)
Command from this pipeline.command - the PipelineProcess to removeNoSuchElementException - if there's no such command in this pipelineNullPointerException - if the specified command is nullCommand<K,V> remove(String name)
Command with the specified name from this pipeline.name - the name under which the Command was stored.NoSuchElementException - if there's no such command with the specified name in this pipelineNullPointerException - if the specified name is nullCommand<K,V> remove(Class commandType)
Command of the specified type from this pipeline.commandType - the type of the commandNoSuchElementException - if there's no such command of the specified type in this pipelineNullPointerException - if the specified command type is nullCommand<K,V> removeFirst()
Command in this pipeline.NoSuchElementException - if this pipeline is emptyCommand<K,V> removeLast()
Command in this pipeline.NoSuchElementException - if this pipeline is emptyCommand<K,V> first()
Command in this pipeline.null if this pipeline is empty.Command<K,V> last()
Command in this pipeline.null if this pipeline is empty.Command<K,V> get(String name)
Command with the specified name in this pipeline.null if there's no such command in this pipeline.<T extends Command<K,V>> T get(Class<T> commandType)
Command of the specified type in this pipeline.null if there's no such command in this pipeline.PipelineProcess<K,V> firstContext()
Command in this pipeline.null if this pipeline is empty.PipelineProcess<K,V> lastContext()
Command in this pipeline.null if this pipeline is empty.PipelineProcess<K,V> context(Command<K,V> command)
Command in this pipeline.null if there's no such command in this pipeline.PipelineProcess<K,V> context(String name)
Command with the
specified name in this pipeline.null if there's no such command in this pipeline.PipelineProcess<K,V> context(Class<? extends Command> commandType)
Command of the
specified type in this pipeline.null if there's no such command in this pipeline.Map<String,Command<K,V>> toMap()
Map whose keys are
command names and whose values are commands.Pipeline fireEvent(Context<K,V> context, CompletableFuture<?> future)
Copyright © 2021. All rights reserved.