本文整理汇总了Java中org.apache.camel.spi.Metadata类的典型用法代码示例。如果您正苦于以下问题:Java Metadata类的具体用法?Java Metadata怎么用?Java Metadata使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Metadata类属于org.apache.camel.spi包,在下文中一共展示了Metadata类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findDefaultValue
import org.apache.camel.spi.Metadata; //导入依赖的package包/类
private String findDefaultValue(VariableElement fieldElement, String fieldTypeName) {
String defaultValue = null;
Metadata metadata = fieldElement.getAnnotation(Metadata.class);
if (metadata != null) {
if (!Strings.isNullOrEmpty(metadata.defaultValue())) {
defaultValue = metadata.defaultValue();
}
}
if (defaultValue == null) {
// if its a boolean type, then we use false as the default
if ("boolean".equals(fieldTypeName) || "java.lang.Boolean".equals(fieldTypeName)) {
defaultValue = "false";
}
}
return defaultValue;
}
示例2: findEipModelProperties
import org.apache.camel.spi.Metadata; //导入依赖的package包/类
protected EipModel findEipModelProperties(RoundEnvironment roundEnv, TypeElement classElement, String javaTypeName, String name) {
EipModel model = new EipModel();
model.setJavaType(javaTypeName);
model.setName(name);
Metadata metadata = classElement.getAnnotation(Metadata.class);
if (metadata != null) {
if (!Strings.isNullOrEmpty(metadata.label())) {
model.setLabel(metadata.label());
}
if (!Strings.isNullOrEmpty(metadata.title())) {
model.setTitle(metadata.title());
}
}
// favor to use class javadoc of component as description
if (model.getJavaType() != null) {
Elements elementUtils = processingEnv.getElementUtils();
TypeElement typeElement = findTypeElement(roundEnv, model.getJavaType());
if (typeElement != null) {
String doc = elementUtils.getDocComment(typeElement);
if (doc != null) {
// need to sanitize the description first (we only want a summary)
doc = sanitizeDescription(doc, true);
// the javadoc may actually be empty, so only change the doc if we got something
if (!Strings.isNullOrEmpty(doc)) {
model.setDescription(doc);
}
}
}
}
return model;
}
示例3: findRequired
import org.apache.camel.spi.Metadata; //导入依赖的package包/类
private boolean findRequired(VariableElement fieldElement, boolean defaultValue) {
Metadata metadata = fieldElement.getAnnotation(Metadata.class);
if (metadata != null) {
if (!Strings.isNullOrEmpty(metadata.required())) {
defaultValue = "true".equals(metadata.required());
}
}
return defaultValue;
}
示例4: consumer
import org.apache.camel.spi.Metadata; //导入依赖的package包/类
/**
* Allows to set a timeout in millis when using Jetty as consumer (server).
* By default Jetty uses 30000. You can use a value of <= 0 to never expire.
* If a timeout occurs then the request will be expired and Jetty will return back a http error 503 to the client.
* This option is only in use when using Jetty with the Asynchronous Routing Engine.
*/
@Metadata(description = "Allows to set a timeout in millis when using Jetty as consumer (server)."
+ " By default Jetty uses 30000. You can use a value of <= 0 to never expire."
+ " If a timeout occurs then the request will be expired and Jetty will return back a http error 503 to the client."
+ " This option is only in use when using Jetty with the Asynchronous Routing Engine.")
public void setContinuationTimeout(Long continuationTimeout) {
this.continuationTimeout = continuationTimeout;
}
示例5: setMessageHistory
import org.apache.camel.spi.Metadata; //导入依赖的package包/类
/**
* Whether message history is enabled on this route.
*/
@XmlAttribute @Metadata(defaultValue = "true")
public void setMessageHistory(String messageHistory) {
this.messageHistory = messageHistory;
}
示例6: setAutoStartup
import org.apache.camel.spi.Metadata; //导入依赖的package包/类
/**
* Whether to auto start this route
*/
@XmlAttribute @Metadata(defaultValue = "true")
public void setAutoStartup(String autoStartup) {
this.autoStartup = autoStartup;
}
示例7: setShutdownRoute
import org.apache.camel.spi.Metadata; //导入依赖的package包/类
/**
* To control how to shutdown the route.
*/
@XmlAttribute @Metadata(defaultValue = "Default")
public void setShutdownRoute(ShutdownRoute shutdownRoute) {
this.shutdownRoute = shutdownRoute;
}
示例8: setShutdownRunningTask
import org.apache.camel.spi.Metadata; //导入依赖的package包/类
/**
* To control how to shutdown the route.
*/
@XmlAttribute @Metadata(defaultValue = "CompleteCurrentTaskOnly")
public void setShutdownRunningTask(ShutdownRunningTask shutdownRunningTask) {
this.shutdownRunningTask = shutdownRunningTask;
}
示例9: setSslKeyPassword
import org.apache.camel.spi.Metadata; //导入依赖的package包/类
/**
* The key password, which is used to access the certificate's key entry in the keystore (this is the same password that is supplied to the keystore command's -keypass option).
*/
@Metadata(description = "The key password, which is used to access the certificate's key entry in the keystore "
+ "(this is the same password that is supplied to the keystore command's -keypass option).")
public void setSslKeyPassword(String sslKeyPassword) {
this.sslKeyPassword = sslKeyPassword;
}
示例10: file
import org.apache.camel.spi.Metadata; //导入依赖的package包/类
/**
* The ssl password, which is required to access the keystore file (this is the same password that is supplied to the keystore command's -storepass option).
*/
@Metadata(description = "The ssl password, which is required to access the keystore file (this is the same password that is supplied to the keystore command's -storepass option).")
public void setSslPassword(String sslPassword) {
this.sslPassword = sslPassword;
}
示例11: setKeystore
import org.apache.camel.spi.Metadata; //导入依赖的package包/类
/**
* Specifies the location of the Java keystore file, which contains the Jetty server's own X.509 certificate in a key entry.
*/
@Metadata(description = "Specifies the location of the Java keystore file, which contains the Jetty server's own X.509 certificate in a key entry.")
public void setKeystore(String sslKeystore) {
this.sslKeystore = sslKeystore;
}
示例12: setErrorHandler
import org.apache.camel.spi.Metadata; //导入依赖的package包/类
/**
* This option is used to set the ErrorHandler that Jetty server uses.
*/
@Metadata(description = "This option is used to set the ErrorHandler that Jetty server uses.")
public void setErrorHandler(ErrorHandler errorHandler) {
this.errorHandler = errorHandler;
}
示例13: setSslSocketConnectors
import org.apache.camel.spi.Metadata; //导入依赖的package包/类
/**
* A map which contains per port number specific SSL connectors.
*/
@Metadata(description = "A map which contains per port number specific SSL connectors.")
public void setSslSocketConnectors(Map <Integer, Connector> connectors) {
sslSocketConnectors = connectors;
}
示例14: setSocketConnectors
import org.apache.camel.spi.Metadata; //导入依赖的package包/类
/**
* A map which contains per port number specific HTTP connectors. Uses the same principle as sslSocketConnectors.
*/
@Metadata(description = "A map which contains per port number specific HTTP connectors. Uses the same principle as sslSocketConnectors.")
public void setSocketConnectors(Map<Integer, Connector> socketConnectors) {
this.socketConnectors = socketConnectors;
}
示例15: setHttpClientMinThreads
import org.apache.camel.spi.Metadata; //导入依赖的package包/类
/**
* To set a value for minimum number of threads in HttpClient thread pool. Notice that both a min and max size must be configured.
*/
@Metadata(description = "To set a value for minimum number of threads in HttpClient thread pool. Notice that both a min and max size must be configured.")
public void setHttpClientMinThreads(Integer httpClientMinThreads) {
this.httpClientMinThreads = httpClientMinThreads;
}