All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.zeroc.IceInternal.ValueFactoryManagerI Maven / Gradle / Ivy

Go to download

Ice is a comprehensive RPC framework that helps you build distributed applications with minimal effort using familiar object-oriented idioms

There is a newer version: 3.7.10
Show newest version
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//

package com.zeroc.IceInternal;

import com.zeroc.Ice.ValueFactory;

final class ValueFactoryManagerI implements com.zeroc.Ice.ValueFactoryManager
{
    public synchronized void add(ValueFactory factory, String id)
    {
        Object o = _factoryMap.get(id);
        if(o != null)
        {
            com.zeroc.Ice.AlreadyRegisteredException ex = new com.zeroc.Ice.AlreadyRegisteredException();
            ex.id = id;
            ex.kindOfObject = "value factory";
            throw ex;
        }
        _factoryMap.put(id, factory);
    }

    public synchronized ValueFactory find(String id)
    {
        return _factoryMap.get(id);
    }

    private java.util.Map _factoryMap = new java.util.HashMap<>();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy