org.jclouds.karaf.commands.support
Class GenericCompleterSupport<T,K>

java.lang.Object
  extended by org.jclouds.karaf.commands.support.GenericCompleterSupport<T,K>
All Implemented Interfaces:
org.apache.karaf.shell.console.Completer, Cacheable<T>
Direct Known Subclasses:
BlobStoreCompleterSupport, ComputeCompleterSupport, RecipeCompleter

public abstract class GenericCompleterSupport<T,K>
extends Object
implements org.apache.karaf.shell.console.Completer, Cacheable<T>


Field Summary
protected static String API_OPTION
           
protected  com.google.common.collect.Multimap<String,String> cache
           
protected  CacheProvider cacheProvider
           
protected  org.apache.karaf.shell.console.completer.StringsCompleter delegate
           
protected static String NAME_OPTION
           
protected static String PROVIDER_OPTION
           
 
Constructor Summary
GenericCompleterSupport()
           
 
Method Summary
 int complete(String buffer, int cursor, List<String> candidates)
           
abstract  K getCacheableKey(T type)
           
 CacheProvider getCacheProvider()
           
 void setCacheProvider(CacheProvider cacheProvider)
           
 void updateOnRemoved(T type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jclouds.karaf.cache.Cacheable
updateOnAdded
 

Field Detail

NAME_OPTION

protected static final String NAME_OPTION
See Also:
Constant Field Values

PROVIDER_OPTION

protected static final String PROVIDER_OPTION
See Also:
Constant Field Values

API_OPTION

protected static final String API_OPTION
See Also:
Constant Field Values

delegate

protected final org.apache.karaf.shell.console.completer.StringsCompleter delegate

cacheProvider

protected CacheProvider cacheProvider

cache

protected com.google.common.collect.Multimap<String,String> cache
Constructor Detail

GenericCompleterSupport

public GenericCompleterSupport()
Method Detail

getCacheableKey

public abstract K getCacheableKey(T type)

complete

public int complete(String buffer,
                    int cursor,
                    List<String> candidates)
Specified by:
complete in interface org.apache.karaf.shell.console.Completer

updateOnRemoved

public void updateOnRemoved(T type)
Specified by:
updateOnRemoved in interface Cacheable<T>

getCacheProvider

public CacheProvider getCacheProvider()

setCacheProvider

public void setCacheProvider(CacheProvider cacheProvider)


Copyright © 2013. All Rights Reserved.