当前位置: 首页>>代码示例>>Java>>正文


Java Metadata类代码示例

本文整理汇总了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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:18,代码来源:EipAnnotationProcessor.java

示例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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:35,代码来源:EipAnnotationProcessor.java

示例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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:10,代码来源:EipAnnotationProcessor.java

示例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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:14,代码来源:JettyHttpComponent.java

示例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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:8,代码来源:RouteDefinition.java

示例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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:8,代码来源:RouteDefinition.java

示例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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:8,代码来源:RouteDefinition.java

示例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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:8,代码来源:RouteDefinition.java

示例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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:9,代码来源:JettyHttpComponent.java

示例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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:8,代码来源:JettyHttpComponent.java

示例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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:8,代码来源:JettyHttpComponent.java

示例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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:8,代码来源:JettyHttpComponent.java

示例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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:8,代码来源:JettyHttpComponent.java

示例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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:8,代码来源:JettyHttpComponent.java

示例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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:8,代码来源:JettyHttpComponent.java


注:本文中的org.apache.camel.spi.Metadata类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。