Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.txbridge.ba.service
Class ServiceInformationManager

    java.lang.Object
      org.jboss.txbridge.ba.service.ServiceInformationManager

    public class ServiceInformationManager

extends java.lang.Object

This class is responsible for caching information about service descriptions. It associates its description with a unique identifier of a service.

Version:
  0.1
Author:
  Maciej P. Machulak (mmachulak@redhat.com)

Field Summary
`private static ServiceInformationManager` | `cim`
`private IdentifierFactory` | `idf`
`private static org.apache.log4j.Logger` | `log`
`private java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.String>` | `methodServiceIdMapping`
`private java.util.concurrent.ConcurrentMap<java.lang.String,ServiceDescription>` | `serviceDescriptions`

Constructor Summary
`private` | `ServiceInformationManager()`

Method Summary
`ServiceDescription` | `getServiceById(java.lang.String serviceId)` This method returns the service description for a service with a given identifier.
`ServiceDescription` | `getServiceByName(java.lang.String completeMethodName)` This method returns the service description for a service with a given identifier.
`java.lang.String` | `getServiceId(java.lang.String completeMethodName)` This method returns the ID for the service with a given class name and given method name.
`static ServiceInformationManager` | `getSingletonInstance()`
`boolean` | `knowsAboutById(java.lang.String serviceId)` This method checks if the service information manager already knows of a service with a given identifier.
`boolean` | `knowsAboutByName(java.lang.String serviceName)` This method checks if the service information manager already knows of a service with a given identifier.
`java.lang.String` | `storeServiceDescription(ServiceDescription serviceDescription)` This method stores a service description.
`private void` | `storeServiceDescription(java.lang.String serviceId, java.lang.String completeMethodName, ServiceDescription serviceDescription)` This method stores a service description for a service with a given complete name and returns a unique associated service ID.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### log

    private static org.apache.log4j.Logger log

### cim

    private static volatile ServiceInformationManager cim

### idf

    private IdentifierFactory idf

### methodServiceIdMapping

    private java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.String> methodServiceIdMapping

### serviceDescriptions

    private java.util.concurrent.ConcurrentMap<java.lang.String,ServiceDescription> serviceDescriptions

Constructor Detail

### ServiceInformationManager

    private ServiceInformationManager()

Method Detail

### getSingletonInstance

    public static ServiceInformationManager getSingletonInstance()

### storeServiceDescription

    public java.lang.String storeServiceDescription(ServiceDescription serviceDescription)

  This method stores a service description. It returns a unique associates service ID.

  Parameters:
    `serviceDescription` - is the service description that needs to be stored.
  Returns:
    is the unique service ID.

### storeServiceDescription

    private void storeServiceDescription(java.lang.String serviceId,
                                         java.lang.String completeMethodName,
                                         ServiceDescription serviceDescription)

  This method stores a service description for a service with a given complete name and returns a unique associated service ID.

  Parameters:
    `serviceId` - is the unique service Id.
    `completeMethodName` - is the complete method's name.
    `serviceDescription` - is the service description.

### getServiceByName

    public ServiceDescription getServiceByName(java.lang.String completeMethodName)

  This method returns the service description for a service with a given identifier.

  Parameters:
    `completeMethodName` - is the complete method name (classname+methodname)
  Returns:
    service description.

### getServiceById

    public ServiceDescription getServiceById(java.lang.String serviceId)

  This method returns the service description for a service with a given identifier.

  Parameters:
    `serviceId` - is the ID of the service.
  Returns:
    service description.

### getServiceId

    public java.lang.String getServiceId(java.lang.String completeMethodName)

  This method returns the ID for the service with a given class name and given method name.

  Parameters:
    `completeMethodName` - is the complete method name (classname+methodname)
  Returns:
    the service ID.

### knowsAboutById

    public boolean knowsAboutById(java.lang.String serviceId)

  This method checks if the service information manager already knows of a service with a given identifier.

  Parameters:
    `serviceId` - is the service identifier.
  Returns:
    true if the service is know, false if not.

### knowsAboutByName

    public boolean knowsAboutByName(java.lang.String serviceName)

  This method checks if the service information manager already knows of a service with a given identifier.

  Parameters:
    `serviceName` - is the full name of the service (class name + method name)
  Returns:
    true if the service is know, false if not.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD