Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.arjuna.wsc11;
 
 import java.util.Map;
The context factory mapper.

Author(s):
kevin
 
public class ContextFactoryMapper
{
    
The factory singleton.
    private static final ContextFactoryMapper theMapper = new ContextFactoryMapper() ;

    
The context factory map.
    private final Map contextFactoryMap = new HashMap() ;
    
Get the context factory mapper singleton.

Returns:
The context factory mapper singleton.
    public static ContextFactoryMapper getMapper()
    {
        return ;
    }

    
Default constructor
    protected ContextFactoryMapper()
    {
    }

    
Add a context factory for the specified coordination type.

Parameters:
coordinationTypeURI The coordination type.
contextFactory The context factory.
    public void addContextFactory(final String coordinationTypeURIfinal ContextFactory contextFactory)
    {
        synchronized()
        {
            .put(coordinationTypeURIcontextFactory) ;
        }
        contextFactory.install(coordinationTypeURI) ;
    }

    
Get the context factory for the specified coordination type.

Parameters:
coordinationTypeURI The coordination type.
Returns:
The context factory.
    public ContextFactory getContextFactory(final String coordinationTypeURI)
    {
        synchronized()
        {
            return (ContextFactory).get(coordinationTypeURI) ;
        }
    }

    
Remove the context factory for the specified coordination type.

Parameters:
coordinationTypeURI The coordination type.
    public void removeContextFactory(final String coordinationTypeURI)
    {
        final Object localContextFactory ;
        synchronized()
        {
            localContextFactory = .remove(coordinationTypeURI) ;
        }
        if (localContextFactory != null)
        {
            ((ContextFactory)localContextFactory).uninstall(coordinationTypeURI) ;
        }
    }
New to GrepCode? Check out our FAQ X