jpos.profile
Class DefaultProfileRegistry

java.lang.Object
  |
  +--jpos.profile.DefaultProfileRegistry
All Implemented Interfaces:
ProfileRegistry

public class DefaultProfileRegistry
extends java.lang.Object
implements ProfileRegistry

Default implementation of the ProfileRegistry using a Hashtable

Since:
1.3 (SF 2K meeting)
Author:
E. Michael Maximilien (maxim@us.ibm.com)

Constructor Summary
DefaultProfileRegistry()
          Default ctor
 
Method Summary
 void addProfile(Profile profile)
          Add an Profile for the service with logical name specified
 void addProfile(java.lang.String profileName, Profile profile)
          Add an Profile for the service with logical name specified
 Profile getProfile(java.lang.String profileName)
           
 java.util.Enumeration getProfiles()
           
 int getSize()
           
 boolean hasProfile(Profile profile)
           
 boolean hasProfile(java.lang.String profileName)
           
 boolean isEmpty()
           
 void removeProfile(Profile profile)
          Removes the specified Profile
 void removeProfile(java.lang.String profileName)
          Removes the Profile with the profileName specified
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultProfileRegistry

public DefaultProfileRegistry()
Default ctor
Method Detail

getSize

public int getSize()
Specified by:
getSize in interface ProfileRegistry
Returns:
the size of the registry

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface ProfileRegistry
Returns:
true if the registry is empty or not

hasProfile

public boolean hasProfile(java.lang.String profileName)
Specified by:
hasProfile in interface ProfileRegistry
Parameters:
profileName - the unique name of this profile
Returns:
true if there is an Profile with the specified logical name

hasProfile

public boolean hasProfile(Profile profile)
Specified by:
hasProfile in interface ProfileRegistry
Parameters:
profile - the profile
Returns:
true if there is an Profile with the specified logical name

getProfiles

public java.util.Enumeration getProfiles()
Specified by:
getProfiles in interface ProfileRegistry
Returns:
an enumeration of Profile objects

getProfile

public Profile getProfile(java.lang.String profileName)
Specified by:
getProfile in interface ProfileRegistry
Parameters:
profileName - the unique name of this profile
Returns:
the Profile for the profileName specified

addProfile

public void addProfile(Profile profile)
Add an Profile for the service with logical name specified
Specified by:
addProfile in interface ProfileRegistry
Parameters:
profile - the profile

addProfile

public void addProfile(java.lang.String profileName,
                       Profile profile)
Add an Profile for the service with logical name specified
Specified by:
addProfile in interface ProfileRegistry
Parameters:
profileName - the unique name of this profile
profile - the profile

removeProfile

public void removeProfile(Profile profile)
Removes the specified Profile
Specified by:
removeProfile in interface ProfileRegistry
Parameters:
profile - the profile to remove

removeProfile

public void removeProfile(java.lang.String profileName)
Removes the Profile with the profileName specified
Specified by:
removeProfile in interface ProfileRegistry
Parameters:
profileName - the unique name of this profile


This API and code belongs to the JavaPOS committee please see LISCENCE file for details