org.jboss.messaging.core.settings
Interface HierarchicalRepository<T>

All Known Implementing Classes:
HierarchicalObjectRepository

public interface HierarchicalRepository<T>

allows objects to be mapped against a regex pattern and held in order in a list

Author:
Andy Taylor

Method Summary
 void addMatch(java.lang.String match, T value)
          Add a new match to the repository
 T getMatch(java.lang.String match)
          return the value held against the nearest match
 void registerListener(HierarchicalRepositoryChangeListener listener)
          register a listener to listen for changes in the repository
 void removeMatch(java.lang.String match)
          remove a match from the repository
 void setDefault(T defaultValue)
          set the default value to fallback to if none found
 void unRegisterListener(HierarchicalRepositoryChangeListener listener)
          unregister a listener
 

Method Detail

addMatch

void addMatch(java.lang.String match,
              T value)
Add a new match to the repository

Parameters:
match - The regex to use to match against
value - the value to hold agains the match

getMatch

T getMatch(java.lang.String match)
return the value held against the nearest match

Parameters:
match - the match to look for
Returns:
the value

setDefault

void setDefault(T defaultValue)
set the default value to fallback to if none found

Parameters:
defaultValue - the value

removeMatch

void removeMatch(java.lang.String match)
remove a match from the repository

Parameters:
match - the match to remove

registerListener

void registerListener(HierarchicalRepositoryChangeListener listener)
register a listener to listen for changes in the repository

Parameters:
listener -

unRegisterListener

void unRegisterListener(HierarchicalRepositoryChangeListener listener)
unregister a listener

Parameters:
listener -


Copyright © 2006 JBoss Inc. All Rights Reserved.