com.xenonsoft.bridgetown.soa.spi
Interface IContextCache

All Known Implementing Classes:
ContextCacheImpl

public interface IContextCache

Interface for an context configuration instance cache. Each context can store an a collection of service beans when they are depicted as singletons.

Version:
$Id: IContextCache.java,v 1.5 2005/03/29 23:41:24 peter_pilgrim Exp $
Author:
Peter Pilgrim, Aug 27, 2004 00:30:39 PM

Method Summary
 void clear()
          Clears the contents of the cache
 boolean contains(java.lang.String serviceId)
          Returns a boolean if the service bean id is stored in the cache
 java.lang.Object getBean(java.lang.String serviceId)
          Retrieves the service bean from the cache object by its name
 ContextConfig getContextConfig()
          Gets the contextConfig
 java.lang.String[] getServiceBeanNames()
          Retrieves a primitive array of service beans managed inside the cache by name
 void putBean(java.lang.String serviceId, java.lang.Object bean)
          Store the service bean in the cache by its name
 java.lang.Object removeBean(java.lang.String serviceId)
          Removes the service bean from the cache object by its name
 int size()
          Returns the current size of the cache
 

Method Detail

getContextConfig

public ContextConfig getContextConfig()
Gets the contextConfig

Returns:
Returns the contextConfig.

clear

public void clear()
Clears the contents of the cache


size

public int size()
Returns the current size of the cache

Returns:
the size

contains

public boolean contains(java.lang.String serviceId)
Returns a boolean if the service bean id is stored in the cache

Parameters:
serviceId - the service bean name
Returns:
true if the bean is returned

getBean

public java.lang.Object getBean(java.lang.String serviceId)
Retrieves the service bean from the cache object by its name

Parameters:
serviceId - the service bean name
Returns:
the service bean or null

putBean

public void putBean(java.lang.String serviceId,
                    java.lang.Object bean)
Store the service bean in the cache by its name

Parameters:
serviceId - the service bean name
bean - the service bean

removeBean

public java.lang.Object removeBean(java.lang.String serviceId)
Removes the service bean from the cache object by its name

Parameters:
serviceId - the service bean name
Returns:
the service bean that has been removed or null

getServiceBeanNames

public java.lang.String[] getServiceBeanNames()
Retrieves a primitive array of service beans managed inside the cache by name

Returns:
the array of service bean names


Copyright © 2005 XeNoNSoFT.com. All Rights Reserved.