/** * 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 { }
/** * 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(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"); }
@ImplementedBy(BasicGroupImpl.class) public interface BasicGroup extends AbstractGroup { @SetFromFlag("childrenAsMembers") /** @deprecated since 0.7.0 use {@link Group#addMemberChild} */ @Deprecated ConfigKey<Boolean> CHILDREN_AS_MEMBERS = new BasicConfigKey<Boolean>( Boolean.class, "brooklyn.BasicGroup.childrenAsMembers", "Whether children are automatically added as group members", false); }
@ImplementedBy(MyAnnotatedEntityImpl.class) public interface MyAnnotatedEntity extends Entity { static MethodEffector<String> EFF_WITH_NEW_ANNOTATION = new MethodEffector<String>(MyAnnotatedEntity.class, "effWithNewAnnotation"); @org.apache.brooklyn.core.annotation.Effector(description="my effector description") public String effWithNewAnnotation( @EffectorParam(name="param1", defaultValue="my default val", description="my param description") String param1); @org.apache.brooklyn.core.annotation.Effector(description="my effector description") public String effWithAnnotationButNoConstant( @EffectorParam(name="param1", defaultValue="my default val", description="my param description") String param1); }
@ImplementedBy(EntityChecksIsRebindingImpl.class) public static interface EntityChecksIsRebinding extends TestEntity { boolean isRebindingValWhenRebinding(); boolean isRebinding(); }
@ImplementedBy(MyEntityImpl.class) public interface MyEntity extends Entity { int getConfigureCount(); int getConfigureDuringConstructionCount(); }
@ImplementedBy(DoNothingSoftwareProcessImpl.class) public interface DoNothingSoftwareProcess extends SoftwareProcess { public static final ConfigKey<Boolean> SKIP_ON_BOX_BASE_DIR_RESOLUTION = ConfigKeys.newConfigKeyWithDefault( BrooklynConfigKeys.SKIP_ON_BOX_BASE_DIR_RESOLUTION, true); }
@ImplementedBy(StubAppServerImpl.class) public interface StubAppServer extends Entity, Startable { public static final AttributeSensor<String> HOSTNAME = Attributes.HOSTNAME; public static final PortAttributeSensorAndConfigKey HTTP_PORT = Attributes.HTTP_PORT; }
@ImplementedBy(MySubEntityImpl.class) public interface MySubEntity extends MyBaseEntity, MyInterface { ConfigKey<String> SUPER_KEY_1 = ConfigKeys.newConfigKeyWithDefault(MyBaseEntity.SUPER_KEY_1, "overridden superKey1 default"); ConfigKey<String> SUB_KEY_2 = ConfigKeys.builder(String.class, "subKey2") .deprecatedNames("oldSubKey2") .build(); }
/** * Similar to {@link TestCluster}, however the intercepts are simply used to record the resize, and not * mock them, instead delegating to {@link DynamicCluster} */ @ImplementedBy(TestSizeRecordingClusterImpl.class) public interface TestSizeRecordingCluster extends DynamicCluster { AttributeSensor<Integer> SIZE_HISTORY_RECORD_COUNT = Sensors.newIntegerSensor("size.history.count", "Number of entries in the size history record"); List<Integer> getSizeHistory(); }
@ImplementedBy(MyBaseEntityImpl.class) public interface MyBaseEntity extends EntityInternal { public static final ConfigKey<String> SUPER_KEY_1 = ConfigKeys.newStringConfigKey("superKey1", "superKey1 key", "superKey1 default"); public static final ConfigKey<String> SUPER_KEY_2 = ConfigKeys.newStringConfigKey("superKey2", "superKey2 key", "superKey2 default"); }
@ImplementedBy(MyOtherEntityImpl.class) @SuppressWarnings("rawtypes") public interface MyOtherEntity extends Entity { public static final ConfigKey<Integer> INT_KEY = ConfigKeys.newIntegerConfigKey("intKey", "int key", 1); public static final ConfigKey<String> STRING_KEY = ConfigKeys.newStringConfigKey("stringKey", "string key", null); public static final ConfigKey<Object> OBJECT_KEY = ConfigKeys.newConfigKey(Object.class, "objectKey", "object key", null); public static final ConfigKey<Closure> CLOSURE_KEY = ConfigKeys.newConfigKey(Closure.class, "closureKey", "closure key", null); public static final ConfigKey<Future> FUTURE_KEY = ConfigKeys.newConfigKey(Future.class, "futureKey", "future key", null); public static final ConfigKey<Task> TASK_KEY = ConfigKeys.newConfigKey(Task.class, "taskKey", "task key", null); public static final ConfigKey<Predicate> PREDICATE_KEY = ConfigKeys.newConfigKey(Predicate.class, "predicateKey", "predicate key", null); public static final IntegerAttributeSensorAndConfigKey SENSOR_AND_CONFIG_KEY = new IntegerAttributeSensorAndConfigKey("sensorConfigKey", "sensor+config key", 1); }
@ImplementedBy(EntityWithContextAwareConstraintImpl.class) public static interface EntityWithContextAwareConstraint extends TestEntity { ConfigKey<String> MUST_BE_DISPLAY_NAME = ConfigKeys.builder(String.class) .name("must-be-display-name") .description("Configuration key that must not be null") .constraint(new MatchesEntityDisplayNamePredicate()) .build(); } public static class EntityWithContextAwareConstraintImpl extends TestEntityImpl implements EntityWithContextAwareConstraint {
@ImplementedBy(GroupRecordingCallsImpl.class) public static interface GroupRecordingCalls extends AbstractGroup { List<String> getCalls(); void clearCalls(); }
/** * A collection of machines running Docker. */ @Catalog(name = "Overlay Network", description = "Docker overlay networking for SDN", iconUrl = "classpath://docker-logo.png") @ImplementedBy(OverlayNetworkImpl.class) public interface OverlayNetwork extends DockerSdnProvider { AttributeSensorAndConfigKey<EntitySpec<?>, EntitySpec<?>> OVERLAY_AGENT_SPEC = ConfigKeys.newSensorAndConfigKeyWithDefault(SDN_AGENT_SPEC, EntitySpec.create(OverlayPlugin.class)); }
@ImplementedBy(MyEntityWithMultipleInterfacesImpl.class) public interface MyEntityWithMultipleInterfaces extends Group, Resizable, EntityLocal { @SetFromFlag("myconfig") public static final ConfigKey<String> MY_CONFIG = new BasicConfigKey<String>( String.class, "test.myentity.myconfig", "My test config"); public static final AttributeSensor<String> MY_SENSOR = new BasicAttributeSensor<String>( String.class, "test.myentity.mysensor", "My test sensor"); }
@ImplementedBy(MyEntity2Impl.class) public interface MyEntity2 extends Entity { @SetFromFlag("myconfig") public static final ConfigKey<String> MY_CONFIG = new BasicConfigKey<String>( String.class, "test.myconfig", "My test config"); @SetFromFlag("subscribe") public static final ConfigKey<Boolean> SUBSCRIBE = new BasicConfigKey<Boolean>( Boolean.class, "test.subscribe", "Whether to do some subscriptions on re-bind", false); public List<String> getEvents(); }
@ImplementedBy(MyLatchingEntityImpl.class) public interface MyLatchingEntity extends Entity { @SuppressWarnings({ "unchecked", "rawtypes" }) @SetFromFlag("subscribe") public static final ConfigKey<AttributeSensor<?>> SUBSCRIBE = new BasicConfigKey( AttributeSensor.class, "test.mylatchingentity.subscribe", "Sensor to subscribe to (or null means don't)", null); @SetFromFlag("publish") public static final ConfigKey<String> PUBLISH = new BasicConfigKey<String>( String.class, "test.mylatchingentity.publish", "Value to publish (or null means don't)", null); public static final AttributeSensor<String> MY_SENSOR = new BasicAttributeSensor<String>( String.class, "test.mylatchingentity.mysensor", "My test sensor"); }