public interface CachingAuthenticationProvider<X extends AuthenticationProvider<X>> extends AuthenticationProvider<X> { String AUTHENTICATION_CACHE_MAX_SIZE = "qpid.auth.cache.size"; @SuppressWarnings("unused") @ManagedContextDefault(name = AUTHENTICATION_CACHE_MAX_SIZE, description = "Upper bound of authentication results the AuthenticationProvider will cache.") int DEFAULT_AUTHENTICATION_CACHE_MAX_SIZE = 100; String AUTHENTICATION_CACHE_EXPIRATION_TIME = "qpid.auth.cache.expiration_time"; @SuppressWarnings("unused") @ManagedContextDefault(name = AUTHENTICATION_CACHE_EXPIRATION_TIME, description = "How long cached credentials are valid in seconds.") long DEFAULT_AUTHENTICATION_CACHE_EXPIRATION_TIME = 10 * 60L; String AUTHENTICATION_CACHE_ITERATION_COUNT = "qpid.auth.cache.iteration_count"; @SuppressWarnings("unused") @ManagedContextDefault(name = AUTHENTICATION_CACHE_ITERATION_COUNT, description = "Number of rounds of hashing to apply to the credentials before using them in the cache.") int DEFAULT_AUTHENTICATION_CACHE_ITERATION_COUNT = 4096; }
private void writeContextDefaults(PrintWriter writer, Collection<ManagedContextDefault> contextDefaults) { writer.println("<table class=\"contextDefault\">"); writer.println("<thead>"); writer.println("<tr><th class=\"name\">Name</th><th class=\"description\">Description</th></tr>"); writer.println("</thead>"); writer.println("<tbody>"); for(ManagedContextDefault contextDefault : contextDefaults) { writer.println("<tr><td class=\"name\">" + contextDefault.name() + "</td><td class=\"description\">" + contextDefault.description() + "</td></tr>"); } writer.println("</tbody>"); writer.println("</table>"); }
String name = annotation.name(); Object value = field.get(null); if (!_defaultContext.containsKey(name))
private Map<String, String> getContextDependencies(final Class<? extends ConfiguredObject> type, final Model model) { final Collection<ManagedContextDefault> contextDependencies = model.getTypeRegistry().getContextDependencies(type); Map<String,String> result = new TreeMap<>(); if(contextDependencies != null) { for(ManagedContextDefault contextDefault : contextDependencies) { result.put(contextDefault.name(), contextDefault.description()); } } return result; }
public interface BDBVirtualHost<X extends BDBVirtualHost<X>> extends QueueManagingVirtualHost<X>, FileBasedSettings, SizeMonitoringSettings, BDBEnvironmentContainer<X> { String STORE_PATH = "storePath"; long BDB_MIN_CACHE_SIZE = 10*1024*1024; String QPID_BROKER_BDB_TOTAL_CACHE_SIZE = "qpid.broker.bdbTotalCacheSize"; // Default the JE cache to 5% of total memory, but no less than 10Mb @ManagedContextDefault(name= QPID_BROKER_BDB_TOTAL_CACHE_SIZE) long DEFAULT_JE_CACHE_SIZE = Math.max(BDB_MIN_CACHE_SIZE, Runtime.getRuntime().maxMemory()/20l); @Override @ManagedAttribute(mandatory = true, defaultValue = "${qpid.work_dir}${file.separator}${this:name}${file.separator}messages") String getStorePath(); @Override @ManagedAttribute(mandatory = true, defaultValue = "0") Long getStoreUnderfullSize(); @Override @ManagedAttribute(mandatory = true, defaultValue = "0") Long getStoreOverfullSize(); }
String getPassword(); @ManagedContextDefault(name = "jdbcvirtualhost.tableNamePrefix", description = "Default value for optional database table prefix") String DEFAULT_JDBC_VIRTUALHOST_TABLE_NAME_PREFIX = "";
PreferenceStoreAttributes getPreferenceStoreAttributes(); @ManagedContextDefault(name = "systemConfig.tableNamePrefix") String DEFAULT_SYSTEM_CONFIG_TABLE_NAME_PREFIX = "";
PreferenceStoreAttributes getPreferenceStoreAttributes(); @ManagedContextDefault(name = "jdbcvirtualhostnode.tableNamePrefix", description = "Default value for optional database table prefix") String DEFAULT_JDBC_VIRTUALHOSTNODE_TABLE_NAME_PREFIX = "";
@ManagedContextDefault(name = HTTP_MANAGEMENT_COMPRESS_RESPONSES) boolean DEFAULT_COMPRESS_RESPONSES = true; @ManagedContextDefault( name = MAX_HTTP_FILE_UPLOAD_SIZE_CONTEXT_NAME) long DEFAULT_MAX_UPLOAD_SIZE = 100 * 1024; @ManagedContextDefault( name = PREFERENCE_OPERTAION_TIMEOUT_CONTEXT_NAME) long DEFAULT_PREFERENCE_OPERATION_TIMEOUT = 10000L; @ManagedContextDefault( name = SASL_EXCHANGE_EXPIRY_CONTEXT_NAME) long DEFAULT_SASL_EXCHANGE_EXPIRY = 60000L;
@ManagedObject(category = false, type = "SiteSpecificTrustStore", description = "Obtains a SSL/TLS certificate from a given URL which the Trust Store will trust for secure connections (e.g., HTTPS or AMQPS)") public interface SiteSpecificTrustStore<X extends SiteSpecificTrustStore<X>> extends TrustStore<X> { String CERTIFICATE = "certificate"; String TRUST_STORE_SITE_SPECIFIC_CONNECT_TIMEOUT = "qpid.trustStore.siteSpecific.connectTimeout"; @ManagedContextDefault(name = TRUST_STORE_SITE_SPECIFIC_CONNECT_TIMEOUT) int DEFAULT_TRUST_STORE_SITE_SPECIFIC_CONNECT_TIMEOUT = 60000; String TRUST_STORE_SITE_SPECIFIC_READ_TIMEOUT = "qpid.trustStore.siteSpecific.readTimeout"; @ManagedContextDefault(name = TRUST_STORE_SITE_SPECIFIC_READ_TIMEOUT) int DEFAULT_TRUST_STORE_SITE_SPECIFIC_READ_TIMEOUT = 60000; @ManagedAttribute(immutable = true, description = "The URL from which to obtain the trusted certificate. Example: https://example.com or https://example.com:8443") String getSiteUrl(); @DerivedAttribute(persist = true, description = "The X.509 certificate obtained from the given URL as base64 encoded representation of the ASN.1 DER encoding") String getCertificate(); @ManagedOperation(description = "Re-download the certificate from the URL", changesConfiguredObjectState = false /* This should really be true but pragmatically it is set to false because we do not want to block the config thread while getting the certificate from the remote host */) void refreshCertificate(); }
@ManagedContextDefault(name = PROPERTY_HEARTBEAT_TIMEOUT_FACTOR) int DEFAULT_HEARTBEAT_TIMEOUT_FACTOR = 2; @ManagedContextDefault(name= HIGH_PREFETCH_LIMIT) long DEFAULT_HIGH_PREFETCH_LIMIT = 100L; @ManagedContextDefault(name= BATCH_LIMIT) long DEFAULT_BATCH_LIMIT = 10L;
@ManagedContextDefault(name = PORT_HTTP_NUMBER_OF_SELECTORS, description = "Desired number of selectors, if negative the number of selector is determined by Jetty") long DEFAULT_PORT_HTTP_NUMBER_OF_SELECTORS = -1; @ManagedContextDefault(name = PORT_HTTP_NUMBER_OF_ACCEPTORS, description = "Desired number of acceptors. If negative the number of acceptors is determined by Jetty." + " If zero, the selector threads are used as acceptors.") @ManagedContextDefault(name = PORT_HTTP_ACCEPT_BACKLOG, description = "The size of the pending connection backlog") int DEFAULT_PORT_HTTP_ACCEPT_BACKLOG = 1024; @ManagedContextDefault(name = ABSOLUTE_SESSION_TIMEOUT, description = "The maximum amount of time (in milliseconds) a session can be active.") long DEFAULT_ABSOLUTE_SESSION_TIMEOUT = -1; @ManagedContextDefault(name = TLS_SESSION_TIMEOUT, description = "TLS session timeout for HTTP ports (seconds).") int DEFAULT_TLS_SESSION_TIMEOUT = 15 * 60; @ManagedContextDefault(name = TLS_SESSION_CACHE_SIZE, description = "TLS session cache size for HTTP ports.") int DEFAULT_TLS_SESSION_CACHE_SIZE = 1000; @ManagedContextDefault( name = PORT_HTTP_THREAD_POOL_MAXIMUM ) long DEFAULT_PORT_HTTP_THREAD_POOL_MAXIMUM = 24; @ManagedContextDefault( name = PORT_HTTP_THREAD_POOL_MINIMUM ) long DEFAULT_PORT_HTTP_THREAD_POOL_MINIMUM = 8;
@ManagedObject( category = false, type= LastValueQueue.LAST_VALUE_QUEUE_TYPE, amqpName = "org.apache.qpid.LastValueQueue") public interface LastValueQueue<X extends LastValueQueue<X>> extends Queue<X> { String LVQ_KEY = "lvqKey"; @ManagedContextDefault( name = "queue.lvqKey" ) String DEFAULT_LVQ_KEY = "qpid.LVQ_key"; String LAST_VALUE_QUEUE_TYPE = "lvq"; @ManagedAttribute(defaultValue = "${queue.lvqKey}") String getLvqKey(); }
@ManagedObject( category = false, type="priority", amqpName = "org.apache.qpid.PriorityQueue" ) public interface PriorityQueue<X extends PriorityQueue<X>> extends Queue<X> { String PRIORITIES = "priorities"; @ManagedContextDefault( name = "queue.priorities") int DEFAULT_PRIORITY_LEVELS = 10; @ManagedAttribute( defaultValue = "${queue.priorities}") int getPriorities(); }
@ManagedObject( category = false, type = "CloudFoundryDashboardManagement" ) public interface CloudFoundryDashboardManagementGroupProvider<X extends CloudFoundryDashboardManagementGroupProvider<X>> extends GroupProvider<X> { String QPID_GROUPPROVIDER_CLOUDFOUNDRY_CONNECT_TIMEOUT = "qpid.groupprovider.cloudfoundry.connectTimeout"; @ManagedContextDefault(name = QPID_GROUPPROVIDER_CLOUDFOUNDRY_CONNECT_TIMEOUT) int DEFAULT_QPID_GROUPPROVIDER_CLOUDFOUNDRY_CONNECT_TIMEOUT = 60000; String QPID_GROUPPROVIDER_CLOUDFOUNDRY_READ_TIMEOUT = "qpid.groupprovider.cloudfoundry.readTimeout"; @ManagedContextDefault(name = QPID_GROUPPROVIDER_CLOUDFOUNDRY_READ_TIMEOUT) int DEFAULT_QPID_GROUPPROVIDER_CLOUDFOUNDRY_READ_TIMEOUT = 60000; @ManagedAttribute( description = "The CloudFoundry dashboard SSO base URI. The API version and service instance information will be appended by this GroupProvider.", mandatory = true ) URI getCloudFoundryEndpointURI(); @ManagedAttribute( description = "The TrustStore that contains the CA certificate that signed the CloudFoundry endpoint." ) TrustStore getTrustStore(); @ManagedAttribute( description = "A service instance id to qpid management group mapping. If the CloudFoundry endpoint grants a user permission to manage a service instance the user will be associated with the corresponding management group.", mandatory = true ) Map<String, String> getServiceToManagementGroupMapping(); @DerivedAttribute List<String> getTlsProtocolWhiteList(); @DerivedAttribute List<String> getTlsProtocolBlackList(); @DerivedAttribute List<String> getTlsCipherSuiteWhiteList(); @DerivedAttribute List<String> getTlsCipherSuiteBlackList(); }
@ManagedContextDefault( name = "virtualhost.housekeepingCheckPeriod") long DEFAULT_HOUSEKEEPING_CHECK_PERIOD = 30000L; @ManagedContextDefault(name = FLOW_TO_DISK_CHECK_PERIOD) long DEFAULT_FLOW_TO_DISK_CHECK_PERIOD = 30000L; @ManagedContextDefault(name = QueueManagingVirtualHost.CONNECTION_THREAD_POOL_KEEP_ALIVE_TIMEOUT) long DEFAULT_CONNECTION_THREAD_POOL_KEEP_ALIVE_TIMEOUT = 60; // Minutes @ManagedContextDefault( name = "virtualhost.storeTransactionIdleTimeoutClose") public static final long DEFAULT_STORE_TRANSACTION_IDLE_TIMEOUT_CLOSE = 0l; @ManagedContextDefault( name = "virtualhost.housekeepingThreadCount") int DEFAULT_HOUSEKEEPING_THREAD_COUNT = 4; @ManagedContextDefault(name = VIRTUALHOST_STATISTICS_REPORING_PERIOD) int DEFAULT_STATISTICS_REPORTING_PERIOD = 0; @ManagedContextDefault(name = DISCARD_GLOBAL_SHARED_SUBSCRIPTION_LINKS_ON_DETACH, description = "If true AMQP 1.0 links of global shared subscriptions are discarded when the" + " link detaches. This is to avoid leaking links with the Qpid JMS client.") @ManagedContextDefault( name = "virtualhost.storeTransactionIdleTimeoutWarn") public static final long DEFAULT_STORE_TRANSACTION_IDLE_TIMEOUT_WARN = 180000l; @ManagedContextDefault( name = "virtualhost.storeTransactionOpenTimeoutClose") public static final long DEFAULT_STORE_TRANSACTION_OPEN_TIMEOUT_CLOSE = 0l; @ManagedContextDefault( name = "virtualhost.storeTransactionOpenTimeoutWarn") public static final long DEFAULT_STORE_TRANSACTION_OPEN_TIMEOUT_WARN = 300000l;
String USE_HOST_NAME_MATCHING = "useHostNameMatching"; @ManagedContextDefault(name = "keyStoreFile.keyStoreType") String DEFAULT_KEYSTORE_TYPE = java.security.KeyStore.getDefaultType(); @ManagedContextDefault(name = "keyStoreFile.keyManagerFactoryAlgorithm") String DEFAULT_KEY_MANAGER_FACTORY_ALGORITHM = KeyManagerFactory.getDefaultAlgorithm();
String PASSWORD = "password"; String STORE_URL = "storeUrl"; @ManagedContextDefault(name = "trustStoreFile.trustStoreType") String DEFAULT_TRUSTSTORE_TYPE = java.security.KeyStore.getDefaultType(); @ManagedContextDefault(name = "trustStoreFile.trustManagerFactoryAlgorithm") String DEFAULT_TRUST_MANAGER_FACTORY_ALGORITHM = KeyManagerFactory.getDefaultAlgorithm(); String PEERS_ONLY = "peersOnly";
@ManagedContextDefault(name = DEFAULT_AMQP_PROTOCOLS) String INSTALLED_PROTOCOLS = AmqpPortImpl.getInstalledProtocolsAsString(); @ManagedContextDefault(name = PORT_MAX_OPEN_CONNECTIONS) int DEFAULT_MAX_OPEN_CONNECTIONS = -1; @ManagedContextDefault( name = PORT_AMQP_THREAD_POOL_SIZE) long DEFAULT_PORT_AMQP_THREAD_POOL_SIZE = 8; @ManagedContextDefault(name = PORT_AMQP_THREAD_POOL_KEEP_ALIVE_TIMEOUT) long DEFAULT_PORT_AMQP_THREAD_POOL_KEEP_ALIVE_TIMEOUT = 60; // Minutes @ManagedContextDefault(name = PORT_AMQP_NUMBER_OF_SELECTORS) long DEFAULT_PORT_AMQP_NUMBER_OF_SELECTORS = Math.max(DEFAULT_PORT_AMQP_THREAD_POOL_SIZE / 8, 1); @ManagedContextDefault(name = PORT_AMQP_ACCEPT_BACKLOG) int DEFAULT_PORT_AMQP_ACCEPT_BACKLOG = 1024; @ManagedContextDefault(name = OPEN_CONNECTIONS_WARN_PERCENT) int DEFAULT_OPEN_CONNECTIONS_WARN_PERCENT = 80; @ManagedContextDefault(name = PROTOCOL_HANDSHAKE_TIMEOUT, description = "Maximum time allowed for a new connection to send a protocol header." + " If the connection does not send a protocol header within this time," @ManagedContextDefault(name = CLOSE_WHEN_NO_ROUTE) boolean DEFAULT_CONNECTION_CLOSE_WHEN_NO_ROUTE = true; @ManagedContextDefault(name = SESSION_COUNT_LIMIT)
@ManagedContextDefault(name = AUTHENTICATION_OAUTH2_CONNECT_TIMEOUT) int DEFAULT_AUTHENTICATION_OAUTH2_CONNECT_TIMEOUT = 60000; @ManagedContextDefault(name = AUTHENTICATION_OAUTH2_READ_TIMEOUT) int DEFAULT_AUTHENTICATION_OAUTH2_READ_TIMEOUT = 60000;