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

com.zeroc.Ice.InitializationData 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.Ice;

/**
 * A class that encapsulates data to initialize a communicator.
 *
 * @see Util#initialize
 * @see Properties
 * @see Logger
 **/
public final class InitializationData implements Cloneable
{
    /**
     * Creates an instance with all members set to null.
     **/
    public
    InitializationData()
    {
    }

    /**
     * Creates and returns a copy of this object.
     **/
    @Override
    public InitializationData
    clone()
    {
        //
        // A member-wise copy is safe because the members are immutable.
        //
        InitializationData c = null;
        try
        {
            c = (InitializationData)super.clone();
        }
        catch(CloneNotSupportedException ex)
        {
            assert false;
        }
        return c;
    }

    /**
     * The properties for the communicator.
     **/
    public Properties properties;

    /**
     * The logger for the communicator.
     **/
    public Logger logger;

    /**
     * The communicator observer used by the Ice run-time.
     **/
    public com.zeroc.Ice.Instrumentation.CommunicatorObserver observer;

    /**
     * threadStart is called whenever the communicator starts a new thread.
     **/
    public Runnable threadStart;

    /**
     * threadStop is called whenever a thread created by the communicator is
     * about to be destroyed.
     **/
    public Runnable threadStop;

    /**
     * The custom class loader for the communicator.
     **/
    public ClassLoader classLoader;

    /**
      * You can control which thread receives operation invocations and AMI
      * callbacks by supplying a dispatcher.
      * 

* For example, you can use this dispatching facility to ensure that * all invocations and callbacks are dispatched in a GUI event loop * thread so that it is safe to invoke directly on GUI objects. *

* The dispatcher is responsible for running (dispatching) the * invocation or AMI callback on its favorite thread. It must execute the * the provided Runnable parameter. The con parameter represents * the connection associated with this dispatch. **/ public java.util.function.BiConsumer dispatcher; /** * Applications that make use of compact type IDs to conserve space * when marshaling class instances, and also use the streaming API to * extract such classes, can intercept the translation between compact * type IDs and their corresponding string type IDs by installing a * compact ID resolver in InitializationData * The parameter id represents the compact ID; the returned value is the * type ID such as "::Module::Class", or an empty string if * the compact ID is unknown. **/ public java.util.function.IntFunction compactIdResolver; /** * The batch request interceptor. **/ public BatchRequestInterceptor batchRequestInterceptor; /** * The value factory manager. **/ public ValueFactoryManager valueFactoryManager; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy