Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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.brooklyn.entity.software.base;
import java.util.Collection;
import java.util.Map;
import org.apache.brooklyn.api.entity.Entity;
import org.apache.brooklyn.api.location.MachineProvisioningLocation;
import org.apache.brooklyn.api.sensor.AttributeSensor;
import org.apache.brooklyn.config.ConfigKey;
import org.apache.brooklyn.core.annotation.Effector;
import org.apache.brooklyn.core.config.BasicConfigInheritance;
import org.apache.brooklyn.core.config.ConfigKeys;
import org.apache.brooklyn.core.config.MapConfigKey;
import org.apache.brooklyn.core.entity.Attributes;
import org.apache.brooklyn.core.entity.BrooklynConfigKeys;
import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
import org.apache.brooklyn.core.entity.lifecycle.Lifecycle.Transition;
import org.apache.brooklyn.core.entity.trait.Startable;
import org.apache.brooklyn.core.sensor.AttributeSensorAndConfigKey;
import org.apache.brooklyn.core.sensor.Sensors;
import org.apache.brooklyn.util.core.flags.SetFromFlag;
import org.apache.brooklyn.util.time.Duration;
import com.google.common.annotations.Beta;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.reflect.TypeToken;
public interface SoftwareProcess extends Entity, Startable {
AttributeSensor HOSTNAME = Attributes.HOSTNAME;
AttributeSensor ADDRESS = Attributes.ADDRESS;
AttributeSensor SUBNET_HOSTNAME = Attributes.SUBNET_HOSTNAME;
AttributeSensor SUBNET_ADDRESS = Attributes.SUBNET_ADDRESS;
// TODO Want this to have typeInheritance.merge as well, but currently only supported for maps
@SuppressWarnings("serial")
ConfigKey> REQUIRED_OPEN_LOGIN_PORTS = ConfigKeys.newConfigKey(
new TypeToken>() {},
"requiredOpenLoginPorts",
"The port(s) to be opened (also see 'inboundPorts.autoInfer')",
ImmutableSet.of(22));
ConfigKey INBOUND_PORTS_CONFIG_REGEX = ConfigKeys.newStringConfigKey("inboundPorts.configRegex",
"Regex governing the opening of ports based on config names (see 'inboundPorts.autoInfer')",
".*\\.port");
ConfigKey INBOUND_PORTS_AUTO_INFER = ConfigKeys.newBooleanConfigKey("inboundPorts.autoInfer",
"By default, the ports to open in iptables and security group is inferred from the config keys. "
+ "This follows a naming convention (defaulting to all config keys matching the name '*.\\.port', "
+ "but customizable with the config key 'inboundPorts.configRegex'), and also including all "
+ "config keys of type 'PortRange'. This behaviour is turned off by setting it to 'false'.",
true);
@SetFromFlag("startTimeout")
ConfigKey START_TIMEOUT = BrooklynConfigKeys.START_TIMEOUT;
@SetFromFlag("startLatch")
ConfigKey START_LATCH = BrooklynConfigKeys.START_LATCH;
@SetFromFlag("stopLatch")
ConfigKey STOP_LATCH = BrooklynConfigKeys.STOP_LATCH;
@SetFromFlag("setupLatch")
ConfigKey SETUP_LATCH = BrooklynConfigKeys.SETUP_LATCH;
@SetFromFlag("installResourcesLatch")
ConfigKey INSTALL_RESOURCES_LATCH = BrooklynConfigKeys.INSTALL_RESOURCES_LATCH;
@SetFromFlag("installLatch")
ConfigKey INSTALL_LATCH = BrooklynConfigKeys.INSTALL_LATCH;
@SetFromFlag("runtimeResourcesLatch")
ConfigKey RUNTIME_RESOURCES_LATCH = BrooklynConfigKeys.RUNTIME_RESOURCES_LATCH;
@SetFromFlag("customizeLatch")
ConfigKey CUSTOMIZE_LATCH = BrooklynConfigKeys.CUSTOMIZE_LATCH;
@SetFromFlag("launchLatch")
ConfigKey LAUNCH_LATCH = BrooklynConfigKeys.LAUNCH_LATCH;
@SetFromFlag("skipStart")
ConfigKey ENTITY_STARTED = BrooklynConfigKeys.SKIP_ENTITY_START;
@SetFromFlag("skipStartIfRunning")
ConfigKey SKIP_ENTITY_START_IF_RUNNING = BrooklynConfigKeys.SKIP_ENTITY_START_IF_RUNNING;
@SetFromFlag("skipInstall")
ConfigKey SKIP_INSTALLATION = BrooklynConfigKeys.SKIP_ENTITY_INSTALLATION;
@SetFromFlag("preInstallCommand")
ConfigKey PRE_INSTALL_COMMAND = BrooklynConfigKeys.PRE_INSTALL_COMMAND;
@SetFromFlag("postInstallCommand")
ConfigKey POST_INSTALL_COMMAND = BrooklynConfigKeys.POST_INSTALL_COMMAND;
@SetFromFlag("preCustomizeCommand")
ConfigKey PRE_CUSTOMIZE_COMMAND = BrooklynConfigKeys.PRE_CUSTOMIZE_COMMAND;
@SetFromFlag("postCustomizeCommand")
ConfigKey POST_CUSTOMIZE_COMMAND = BrooklynConfigKeys.POST_CUSTOMIZE_COMMAND;
@SetFromFlag("preLaunchCommand")
ConfigKey PRE_LAUNCH_COMMAND = BrooklynConfigKeys.PRE_LAUNCH_COMMAND;
@SetFromFlag("postLaunchCommand")
ConfigKey POST_LAUNCH_COMMAND = BrooklynConfigKeys.POST_LAUNCH_COMMAND;
@SetFromFlag("env")
MapConfigKey