groovyx.gpars.dataflow.impl
Class DataflowChannelEventOrchestrator<T>

java.lang.Object
  extended by groovyx.gpars.dataflow.impl.DataflowChannelEventOrchestrator<T>
All Implemented Interfaces:
BindErrorDistibutor<T>, BindErrorListenerManager<T>, DataflowChannelEventDistibutor<T>, DataflowChannelEventListenerManager<T>

public final class DataflowChannelEventOrchestrator<T>
extends java.lang.Object
implements DataflowChannelEventListenerManager<T>, BindErrorListenerManager<T>, DataflowChannelEventDistibutor<T>, BindErrorDistibutor<T>

Groups the listener-related functionality shared by dataflow channels

Author:
Vaclav Pech

Field Summary
private  java.util.Collection<BindErrorListener<T>> BindErrorListener
           
private  java.util.Collection<DataflowChannelListener<T>> listeners
           
 
Constructor Summary
DataflowChannelEventOrchestrator()
           
 
Method Summary
 void addAllBindErrorListeners(java.util.Collection<BindErrorListener<T>> listeners)
           
 void addAllDataflowChannelListeners(java.util.Collection<DataflowChannelListener<T>> listeners)
           
 void addBindErrorListener(BindErrorListener<T> listener)
           
 void addDataflowChannelListener(DataflowChannelListener<T> listener)
           
 void fireBindError(java.lang.Throwable oldError, T failedValue, boolean uniqueBind)
          Notifies all listeners about failed bind operations
 void fireBindError(java.lang.Throwable oldError, java.lang.Throwable failedError)
          Notifies all listeners about failed bindError operations
 void fireBindError(T oldValue, T failedValue, boolean uniqueBind)
          Notifies all listeners about failed bind operations
 void fireBindError(T oldValue, java.lang.Throwable failedError)
          Notifies all listeners about failed bindError operations
 void fireOnMessage(T message)
           
 java.util.Collection<BindErrorListener<T>> getBindErrorListeners()
           
 java.util.Collection<DataflowChannelListener<T>> getListeners()
           
 void removeBindErrorListener(BindErrorListener<T> listener)
           
 void removeDataflowChannelListener(DataflowChannelListener<T> listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

private final java.util.Collection<DataflowChannelListener<T>> listeners

BindErrorListener

private final java.util.Collection<BindErrorListener<T>> BindErrorListener
Constructor Detail

DataflowChannelEventOrchestrator

public DataflowChannelEventOrchestrator()
Method Detail

addDataflowChannelListener

public void addDataflowChannelListener(DataflowChannelListener<T> listener)
Specified by:
addDataflowChannelListener in interface DataflowChannelEventListenerManager<T>

addAllDataflowChannelListeners

public void addAllDataflowChannelListeners(java.util.Collection<DataflowChannelListener<T>> listeners)
Specified by:
addAllDataflowChannelListeners in interface DataflowChannelEventListenerManager<T>

removeDataflowChannelListener

public void removeDataflowChannelListener(DataflowChannelListener<T> listener)
Specified by:
removeDataflowChannelListener in interface DataflowChannelEventListenerManager<T>

getListeners

public java.util.Collection<DataflowChannelListener<T>> getListeners()
Specified by:
getListeners in interface DataflowChannelEventListenerManager<T>

fireOnMessage

public void fireOnMessage(T message)
Specified by:
fireOnMessage in interface DataflowChannelEventDistibutor<T>

addBindErrorListener

public void addBindErrorListener(BindErrorListener<T> listener)
Specified by:
addBindErrorListener in interface BindErrorListenerManager<T>

addAllBindErrorListeners

public void addAllBindErrorListeners(java.util.Collection<BindErrorListener<T>> listeners)
Specified by:
addAllBindErrorListeners in interface BindErrorListenerManager<T>

removeBindErrorListener

public void removeBindErrorListener(BindErrorListener<T> listener)
Specified by:
removeBindErrorListener in interface BindErrorListenerManager<T>

getBindErrorListeners

public java.util.Collection<BindErrorListener<T>> getBindErrorListeners()
Specified by:
getBindErrorListeners in interface BindErrorListenerManager<T>

fireBindError

public void fireBindError(T oldValue,
                          T failedValue,
                          boolean uniqueBind)
Notifies all listeners about failed bind operations

Specified by:
fireBindError in interface BindErrorDistibutor<T>
Parameters:
oldValue - The already bound value
failedValue - The value attempted to be bound
uniqueBind - Flag indicating bindUnique() method call

fireBindError

public void fireBindError(T oldValue,
                          java.lang.Throwable failedError)
Notifies all listeners about failed bindError operations

Specified by:
fireBindError in interface BindErrorDistibutor<T>
Parameters:
oldValue - The already bound value
failedError - The error attempted to be bound

fireBindError

public void fireBindError(java.lang.Throwable oldError,
                          T failedValue,
                          boolean uniqueBind)
Notifies all listeners about failed bind operations

Specified by:
fireBindError in interface BindErrorDistibutor<T>
Parameters:
oldError - The already bound Throwable
failedValue - The value attempted to be bound
uniqueBind - Flag indicating bindUnique() method call

fireBindError

public void fireBindError(java.lang.Throwable oldError,
                          java.lang.Throwable failedError)
Notifies all listeners about failed bindError operations

Specified by:
fireBindError in interface BindErrorDistibutor<T>
Parameters:
oldError - The already bound Throwable
failedError - The error attempted to be bound

Copyright © 2008–2013 Václav Pech. All Rights Reserved.