本文整理汇总了Java中org.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionException类的典型用法代码示例。如果您正苦于以下问题:Java MalformedStreamDefinitionException类的具体用法?Java MalformedStreamDefinitionException怎么用?Java MalformedStreamDefinitionException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MalformedStreamDefinitionException类属于org.wso2.carbon.databridge.commons.exception包,在下文中一共展示了MalformedStreamDefinitionException类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: publish
import org.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionException; //导入依赖的package包/类
public static void publish(String protocol, String host, String port, String username, String password,
String streamId,String dataFileName, String testCaseFolderName, StreamDefinition streamDefinition,
int events, int delay) throws MalformedStreamDefinitionException,
StreamDefinitionException, DifferentStreamDefinitionAlreadyDefinedException,
MalformedURLException, NoStreamDefinitionExistException, AuthenticationException,
TransportException, SocketException, DataEndpointAgentConfigurationException, DataEndpointException,
DataEndpointAuthenticationException, DataEndpointConfigurationException {
String relativeFilePath = getTestDataFileLocation(testCaseFolderName, dataFileName);
KeyStoreUtil.setTrustStoreParams();
//create data publisher
DataPublisher dataPublisher = new DataPublisher(protocol, "tcp://" + host + ":" + port, null, username,
password);
//Publish event for a valid stream
publishEvents(dataPublisher, streamDefinition, relativeFilePath, events, delay);
dataPublisher.shutdown();
}
开发者ID:wso2,项目名称:product-cep,代码行数:21,代码来源:Wso2EventClient.java
示例2: addStreamDefinition
import org.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionException; //导入依赖的package包/类
public void addStreamDefinition(String streamDefinitionStr, int tenantId)
throws StreamDefinitionStoreException, MalformedStreamDefinitionException {
StreamDefinition streamDefinition = EventDefinitionConverterUtils.convertFromJson(streamDefinitionStr);
getStreamDefinitionStore().saveStreamDefinitionToStore(streamDefinition, tenantId);
}
开发者ID:apache,项目名称:stratos,代码行数:6,代码来源:ThriftTestServer.java
示例3: init
import org.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionException; //导入依赖的package包/类
public void init(DataPublisherConfiguration dataPublisherConfig) throws DataPublisherException {
this.dataPublisherConfig = dataPublisherConfig;
List<Integer> ports = new ArrayList<Integer>();
ports.add(Integer.parseInt(dataPublisherConfig.getMonitoringServerPort()));
ports.add(Integer.parseInt(dataPublisherConfig.getMonitoringServerSecurePort()));
// wait till monitoring server ports are active
CartridgeAgentUtils.waitUntilPortsActive(dataPublisherConfig.getMonitoringServerIp(), ports);
if (!CartridgeAgentUtils.checkPortsActive(dataPublisherConfig.getMonitoringServerIp(), ports)) {
throw new DataPublisherException("Monitoring server not active, data publishing is aborted");
}
// stream definition identifier = {log.publisher.<cluster id>}
try {
streamDefinition = new StreamDefinition(Constants.LOG_PUBLISHER_STREAM_PREFIX + getValidTenantId(CartridgeAgentConfiguration.getInstance().getTenantId()) + "." + getAlias(CartridgeAgentConfiguration.getInstance().getClusterId()) + "." + getCurrentDate(),
Constants.LOG_PUBLISHER_STREAM_VERSION);
} catch (MalformedStreamDefinitionException e) {
throw new RuntimeException(e);
}
streamDefinition.setDescription("Apache Stratos Instance Log Publisher");
List<Attribute> metaDataDefinition = new ArrayList<Attribute>();
metaDataDefinition.add(new Attribute(Constants.MEMBER_ID, AttributeType.STRING));
List<Attribute> payloadDataDefinition = new ArrayList<Attribute>();
payloadDataDefinition.add(new Attribute(Constants.TENANT_ID, AttributeType.STRING));
payloadDataDefinition.add(new Attribute(Constants.SERVER_NAME, AttributeType.STRING));
payloadDataDefinition.add(new Attribute(Constants.APP_NAME, AttributeType.STRING));
payloadDataDefinition.add(new Attribute(Constants.LOG_TIME, AttributeType.LONG));
payloadDataDefinition.add(new Attribute(Constants.PRIORITY, AttributeType.STRING));
payloadDataDefinition.add(new Attribute(Constants.MESSAGE, AttributeType.STRING));
payloadDataDefinition.add(new Attribute(Constants.LOGGER, AttributeType.STRING));
payloadDataDefinition.add(new Attribute(Constants.IP, AttributeType.STRING));
payloadDataDefinition.add(new Attribute(Constants.INSTANCE, AttributeType.STRING));
payloadDataDefinition.add(new Attribute(Constants.STACKTRACE, AttributeType.STRING));
streamDefinition.setMetaData(metaDataDefinition);
streamDefinition.setPayloadData(payloadDataDefinition);
}
开发者ID:apache,项目名称:stratos,代码行数:44,代码来源:LogPublisherManager.java
示例4: setUp
import org.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionException; //导入依赖的package包/类
@Before
public void setUp() throws MalformedStreamDefinitionException {
URL configFileUrl = ThriftClientConfigParserTest.class.getResource("/thrift-client-config.xml");
System.setProperty(ThriftClientConfig.THRIFT_CLIENT_CONFIG_FILE_PATH, configFileUrl.getPath());
streamDefinition = new StreamDefinition("Test", "1.0.0");
}
开发者ID:apache,项目名称:stratos,代码行数:7,代码来源:ThriftStatisticsPublisherTest.java
示例5: addStreamDefinition
import org.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionException; //导入依赖的package包/类
/**
* Adds a stream definition to in memory stream definition store.
*
* @param streamDefinition string representation of the stream definition.
* @throws MalformedStreamDefinitionException
* @throws DifferentStreamDefinitionAlreadyDefinedException
* @throws StreamDefinitionStoreException
*/
public void addStreamDefinition(String streamDefinition) throws MalformedStreamDefinitionException,
DifferentStreamDefinitionAlreadyDefinedException, StreamDefinitionStoreException {
inMemoryStreamDefinitionStore.saveStreamDefinition(new Credentials("admin", "admin", "admin"),
EventDefinitionConverterUtils.convertFromJson(streamDefinition));
}
开发者ID:wso2,项目名称:product-as,代码行数:14,代码来源:ThriftTestServer.java
注:本文中的org.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论