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

org.apache.river.phoenix.common.ActivationGroupData Maven / Gradle / Ivy

The newest version!
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.river.phoenix.common;

import java.io.IOException;
import java.io.Serializable;
import org.apache.river.api.io.AtomicSerial;
import org.apache.river.api.io.AtomicSerial.GetArg;

/**
 * Initialization data for  ActivationGroupImpl, to control the
 * activation group's configuration. An instance of this is specified
 * in the ActivationGroupDesc for the group.
 *
 * @author Sun Microsystems, Inc.
 * 
 * @since 2.0
 */
@AtomicSerial
public class ActivationGroupData implements Serializable {
    private static final long serialVersionUID = 1135616886784731068L;

    /**
     * The configuration options.
     *
     * @serial
     */
    private final String[] config;

    /**
     * Constructs an instance with the specified
     * {@link net.jini.config.Configuration} options, if any.
     *
     * @param config the configuration options, or null
     */
    public ActivationGroupData(String[] config) {
	this.config = (config == null ? null : (String[]) config.clone());
    }
    
    ActivationGroupData(GetArg arg) throws IOException, ClassNotFoundException{
	this(arg.get("config", null, String[].class));
    }

    /**
     * Returns the configuration options, or null.
     *
     * @return the configuration options, or null
     */
    public String[] getConfig() {
	return config == null ? null : (String[]) config.clone();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy