org.sonar.channel
Class ChannelDispatcher<OUTPUT>

java.lang.Object
  extended by org.sonar.channel.Channel<OUTPUT>
      extended by org.sonar.channel.ChannelDispatcher<OUTPUT>

public class ChannelDispatcher<OUTPUT>
extends Channel<OUTPUT>


Nested Class Summary
static class ChannelDispatcher.Builder
           
 
Constructor Summary
ChannelDispatcher(Channel... channels)
          Deprecated. in version 2.9. Please use the builder() method
ChannelDispatcher(List<Channel> channels)
          Deprecated. in version 2.9. Please use the builder() method
ChannelDispatcher(List<Channel> channels, boolean failIfNoChannelToConsumeOneCharacter)
          Deprecated. in version 2.9. Please use the builder() method
 
Method Summary
static ChannelDispatcher.Builder builder()
          Get a Builder instance to build a new ChannelDispatcher
 boolean consume(CodeReader code, OUTPUT output)
          Tries to consume the character stream at the current reading cursor position (provided by the CodeReader).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelDispatcher

@Deprecated
public ChannelDispatcher(List<Channel> channels)
Deprecated. in version 2.9. Please use the builder() method


ChannelDispatcher

@Deprecated
public ChannelDispatcher(Channel... channels)
Deprecated. in version 2.9. Please use the builder() method


ChannelDispatcher

@Deprecated
public ChannelDispatcher(List<Channel> channels,
                                    boolean failIfNoChannelToConsumeOneCharacter)
Deprecated. in version 2.9. Please use the builder() method

Method Detail

consume

public boolean consume(CodeReader code,
                       OUTPUT output)
Description copied from class: Channel
Tries to consume the character stream at the current reading cursor position (provided by the CodeReader). If the character stream is consumed the method must return true and the OUTPUT object can be fed.

Specified by:
consume in class Channel<OUTPUT>
Parameters:
code - the handle on the input character stream
output - the OUTPUT that can be optionally fed by the Channel
Returns:
false if the Channel doesn't want to consume the character stream, true otherwise.

builder

public static ChannelDispatcher.Builder builder()
Get a Builder instance to build a new ChannelDispatcher



Copyright © 2009-2012 SonarSource. All Rights Reserved.