/** * The most basic implementation of an application possible. * Used (internally) for the default type of application to be built. * * @author aled */ @ImplementedBy(BasicApplicationImpl.class) public interface BasicApplication extends StartableApplication { }
private <T extends Entity> Class<? extends T> getFromAnnotation(Class<T> type) { ImplementedBy annotation = type.getAnnotation(org.apache.brooklyn.api.entity.ImplementedBy.class); if (annotation == null) return null; Class<? extends Entity> value = annotation.value(); checkIsImplementation(type, value); return (Class<? extends T>) value; }
/** * An app that starts up asynchronously. Calling start will call start on its children, * but it does not expect the children to have started by the time the start() effector * has returned. Instead, it infers from the children's state whether they are up or not. */ @ImplementedBy(AsyncApplicationImpl.class) public interface AsyncApplication extends StartableApplication, AsyncStartable { }
@ImplementedBy(EmptyWindowsProcessImpl.class) public interface EmptyWindowsProcess extends SoftwareProcess { // 3389 is RDP; 5985 is WinRM (3389 isn't used by Brooklyn, but useful for the end-user subsequently) ConfigKey<Collection<Integer>> REQUIRED_OPEN_LOGIN_PORTS = ConfigKeys.newConfigKeyWithDefault( SoftwareProcess.REQUIRED_OPEN_LOGIN_PORTS, ImmutableSet.of(5986, 5985, 3389)); ConfigKey<Boolean> USE_WINRM_MONITORING = ConfigKeys.newConfigKey("winrmMonitoring.enabled", "WinRM monitoring enabled", Boolean.TRUE); }
@ImplementedBy(EmptySoftwareProcessImpl.class) public interface EmptySoftwareProcess extends SoftwareProcess { ConfigKey<Boolean> USE_SSH_MONITORING = ConfigKeys.newConfigKey("sshMonitoring.enabled", "SSH monitoring enabled", Boolean.TRUE); public SoftwareProcessDriver getDriver(); }
/** * The Overlay network plugin */ @ImplementedBy(OverlayPluginImpl.class) public interface OverlayPlugin extends SdnAgent { }
@ImplementedBy(OpenShiftResourceImpl.class) public interface OpenShiftResource extends KubernetesResource { String DEPLOYMENT_CONFIG = "DeploymentConfig"; String PROJECT = "Project"; String TEMPLATE = "Template"; String BUILD_CONFIG = "BuildConfig"; }
@ImplementedBy(QuarantineGroupImpl.class) public interface QuarantineGroup extends AbstractGroup { @Effector(description="Removes all members of the quarantined group, unmanaging them") void expungeMembers( @EffectorParam(name="firstStop", description="Whether to first call stop() on those members that are stoppable") boolean stopFirst); }
@ImplementedBy(AbstractNonProvisionedControllerImpl.class) public interface AbstractNonProvisionedController extends LoadBalancer, Entity { public boolean isActive(); Set<String> getServerPoolAddresses(); }
/** * This is the most basic entity possible - does nothing beyond AbstractEntity. * Useful when structuring the entity management hierarchy; also consider using * {@link BasicGroup}. * <p> * Example usage is: {@code EntitySpec.create(BasicEntity.class)}. */ @ImplementedBy(BasicEntityImpl.class) public interface BasicEntity extends Entity { }
@ImplementedBy(QpidQueueImpl.class) public interface QpidQueue extends QpidDestination, Queue { @Override public String getExchangeName(); }
/** * An OpenStack virtual network segment. */ @ImplementedBy(OpenStackVirtualNetworkImpl.class) public interface OpenStackVirtualNetwork extends VirtualNetwork { }
/** * This implementation will start all child entities in parallel. */ @ImplementedBy(value = ParallelTestCaseImpl.class) public interface ParallelTestCase extends TargetableTestComponent { }
@ImplementedBy(DynamicRegionsFabricImpl.class) public interface DynamicRegionsFabric extends DynamicFabric { MethodEffector<String> ADD_REGION = new MethodEffector<String>(DynamicRegionsFabric.class, "addRegion"); MethodEffector<String> REMOVE_REGION = new MethodEffector<String>(DynamicRegionsFabric.class, "removeRegion"); @Effector(description="Extends the fabric with a new instance of the fabric's underlying blueprint in a new region, "+ "returning the id of the new entity") public String addRegion( @EffectorParam(name="location", description="Location spec string " + "(e.g. aws-ec2:us-west-1)") String location); @Effector(description="Stops and removes a region") public void removeRegion( @EffectorParam(name="id", description="ID of the child entity to stop and remove") String id); }
/** * The Calico NetworkModule for Mesos. */ @ImplementedBy(CalicoModuleImpl.class) public interface CalicoModule extends SdnProvider { AttributeSensorAndConfigKey<Entity, Entity> MESOS_CLUSTER = MesosAttributes.MESOS_CLUSTER; AttributeSensorAndConfigKey<String, String> ETCD_CLUSTER_URL = EtcdProxy.ETCD_CLUSTER_URL; ConfigKey<Boolean> USE_IPIP = ConfigKeys.newBooleanConfigKey("calico.ipip", "Use the IPIP protocol for inter-VM traffic", Boolean.FALSE); ConfigKey<Boolean> USE_NAT = ConfigKeys.newBooleanConfigKey("calico.nat", "Use NAT for outgoing traffic", Boolean.FALSE); MesosCluster getMesosCluster(); String execCalicoCommand(MesosSlave slave, String command); InetAddress attachNetwork(MesosSlave slave, Entity entity, String containerId, String subnetId); }
@ImplementedBy(ChefEntityImpl.class) public interface ChefEntity extends SoftwareProcess, ChefConfig { }
/** * A cluster of load balancers, where configuring the cluster (through the LoadBalancer interface) * will configure all load balancers in the cluster. * * Config keys (such as LoadBalancer.serverPool and LoadBalancer.urlMappings) are automatically * inherited by the children of the load balancer cluster. It is through that mechanism that * configuration changes on the cluster will be applied to all child load balancers (i.e. by * them all sharing the same serverPool and urlMappings etc). * * @author aled */ @ImplementedBy(LoadBalancerClusterImpl.class) public interface LoadBalancerCluster extends DynamicCluster, LoadBalancer { }
/** * Tests using a simple command execution. * * @deprecated since 0.10.0; use {@link TestSshCommand} */ @Deprecated @ImplementedBy(SimpleShellCommandTestImpl.class) public interface SimpleShellCommandTest extends TestSshCommand { }
@ImplementedBy(FeedExceptionEntityImpl.class) public static interface FeedExceptionEntity extends Entity { ConfigKey<ThrowingPoller> POLLER = ConfigKeys.newConfigKey(ThrowingPoller.class, "poller"); AttributeSensor<Boolean> FLAG = Sensors.newBooleanSensor("flag"); void startThrowingPollExceptions(); void stopThrowingPollExceptions(); }
@ImplementedBy(MySubEntityImpl.class) public interface MySubEntity extends MyBaseEntity, MyInterface { public static final ConfigKey<String> SUPER_KEY_1 = ConfigKeys.newConfigKeyWithDefault(MyBaseEntity.SUPER_KEY_1, "overridden superKey1 default"); public static final ConfigKey<String> SUB_KEY_2 = ConfigKeys.newStringConfigKey("subKey2", "subKey2 key", "subKey2 default"); }