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


Java ServiceEnvironment类代码示例

本文整理汇总了Java中org.omg.dds.core.ServiceEnvironment的典型用法代码示例。如果您正苦于以下问题:Java ServiceEnvironment类的具体用法?Java ServiceEnvironment怎么用?Java ServiceEnvironment使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ServiceEnvironment类属于org.omg.dds.core包,在下文中一共展示了ServiceEnvironment类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createDDSEntities

import org.omg.dds.core.ServiceEnvironment; //导入依赖的package包/类
private void createDDSEntities() {
    // Configure DDS ServiceEnvironment class to be Vortex Cafe
    System.setProperty(ServiceEnvironment.IMPLEMENTATION_CLASS_NAME_PROPERTY,
            Config.DDS_BOOTSTRAP_CLASS);

    // Create a DDS ServiceEnvironment
    final ServiceEnvironment env =
            ServiceEnvironment.createInstance(this.getClass().getClassLoader());

    // Get the DomainParticipantFactory singleton
    final DomainParticipantFactory dpf =
            DomainParticipantFactory.getInstance(env);

    // Get the PolicyFactory singleton
    final PolicyFactory pf =
            PolicyFactory.getPolicyFactory(env);

    // Create a DomainParticipant on DomainID
    dp = dpf.createParticipant(domainId);

    // Create a topic with ChirpAction type
    Topic<ChirpAction> topic = dp.createTopic(Config.CHIRP_ACTION_TOPIC, ChirpAction.class);

    // Create a new publisher
    final PublisherQos publisherQos = dp.getDefaultPublisherQos().withPolicy(
        pf.Partition().withName(partitions)
    );

    final Publisher pub = dp.createPublisher(publisherQos);

    // Create a writer for the ChirpAction topic
    final DataWriterQos dwQos = pub.getDefaultDataWriterQos().withPolicies(
        pf.Reliability().withReliable(),
        pf.Durability().withTransientLocal()
    );
    dw = pub.createDataWriter(topic, dwQos);
}
 
开发者ID:ADLINK-IST,项目名称:vortex-chirpit,代码行数:38,代码来源:ChirpOut.java

示例2: createDDSEntities

import org.omg.dds.core.ServiceEnvironment; //导入依赖的package包/类
private void createDDSEntities() {
    // Configure DDS ServiceEnvironment class to be Vortex Cafe
    System.setProperty(ServiceEnvironment.IMPLEMENTATION_CLASS_NAME_PROPERTY,
            Config.DDS_BOOTSTRAP_CLASS);

    // Create a DDS ServiceEnvironment
    final ServiceEnvironment env =
            ServiceEnvironment.createInstance(this.getClass().getClassLoader());

    // Get the DomainParticipantFactory singleton
    final DomainParticipantFactory dpf =
            DomainParticipantFactory.getInstance(env);

    // Get the PolicyFactory singleton
    final PolicyFactory pf =
            PolicyFactory.getPolicyFactory(env);

    // Create a DomainParticipant on DomainID
    dp = dpf.createParticipant(domainId);

    // Create a topic with ChirpAction type
    Topic<ChirpAction> topic = dp.createTopic(Config.CHIRP_ACTION_TOPIC, ChirpAction.class);

    // Create a new subscriber
    final SubscriberQos subQos = dp.getDefaultSubscriberQos().withPolicy(
            pf.Partition().withName(partitions)
        );

    final Subscriber sub = dp.createSubscriber(subQos);


    // Create a reader for the ChirpAction topic
    final DataReaderQos drQos = sub.getDefaultDataReaderQos().withPolicies(
            pf.Reliability().withReliable(),
            pf.Durability().withTransientLocal()
    );
    dr = sub.createDataReader(topic, drQos);
}
 
开发者ID:ADLINK-IST,项目名称:vortex-chirpit,代码行数:39,代码来源:ChirpIn.java

示例3: newKeyedBytes

import org.omg.dds.core.ServiceEnvironment; //导入依赖的package包/类
public static KeyedBytes newKeyedBytes(ServiceEnvironment env)
{
    return env.getSPI().newKeyedBytes();
}
 
开发者ID:davnoe,项目名称:dds-psm-java,代码行数:5,代码来源:KeyedBytes.java

示例4: newKeyedString

import org.omg.dds.core.ServiceEnvironment; //导入依赖的package包/类
public static KeyedString newKeyedString(ServiceEnvironment env)
{
    return env.getSPI().newKeyedString();
}
 
开发者ID:davnoe,项目名称:dds-psm-java,代码行数:5,代码来源:KeyedString.java

示例5: getInstance

import org.omg.dds.core.ServiceEnvironment; //导入依赖的package包/类
/**
 * @param env       Identifies the Service instance to which the
 *                  object will belong.
 */
public static DynamicDataFactory getInstance(ServiceEnvironment env)
{
    return env.getSPI().getDynamicDataFactory();
}
 
开发者ID:davnoe,项目名称:dds-psm-java,代码行数:9,代码来源:DynamicDataFactory.java

示例6: getInstance

import org.omg.dds.core.ServiceEnvironment; //导入依赖的package包/类
/**
 * @param env       Identifies the Service instance to which the
 *                  object will belong.
 */
public static DynamicTypeFactory getInstance(ServiceEnvironment env)
{
    return env.getSPI().getTypeFactory();
}
 
开发者ID:davnoe,项目名称:dds-psm-java,代码行数:9,代码来源:DynamicTypeFactory.java

示例7: allStatuses

import org.omg.dds.core.ServiceEnvironment; //导入依赖的package包/类
/**
 * @param env       Identifies the Service instance to which the
 *                  object will belong.
 */
public static Set<Class<? extends Status>> allStatuses(
        ServiceEnvironment env)
{
    return env.getSPI().allStatusKinds();
}
 
开发者ID:davnoe,项目名称:dds-psm-java,代码行数:10,代码来源:Status.java

示例8: noStatuses

import org.omg.dds.core.ServiceEnvironment; //导入依赖的package包/类
/**
 * @param env Identifies the Service instance to which the
 *                  object will belong.
 */
public static Set<Class<? extends Status>> noStatuses(
        ServiceEnvironment env)
{
    return env.getSPI().noStatusKinds();
}
 
开发者ID:davnoe,项目名称:dds-psm-java,代码行数:10,代码来源:Status.java

示例9: getPolicyFactory

import org.omg.dds.core.ServiceEnvironment; //导入依赖的package包/类
public static PolicyFactory getPolicyFactory(ServiceEnvironment env)
{
	return env.getSPI().getPolicyFactory();
}
 
开发者ID:davnoe,项目名称:dds-psm-java,代码行数:5,代码来源:PolicyFactory.java

示例10: newTypeSupport

import org.omg.dds.core.ServiceEnvironment; //导入依赖的package包/类
/**
 * Create a new TypeSupport object for the given physical type.
 * This method is equivalent to:
 * 
 * <code>newTypeSupport(type, type.getClass().getName(), bootstrap)</code>
 * 
 * @see #newTypeSupport(Class, String, ServiceEnvironment)
 */
public static <TYPE> TypeSupport<TYPE> newTypeSupport(
        Class<TYPE> type,
        ServiceEnvironment env)
{
    return newTypeSupport(type, type.getClass().getName(), env);
}
 
开发者ID:davnoe,项目名称:dds-psm-java,代码行数:15,代码来源:TypeSupport.java

示例11: getInstance

import org.omg.dds.core.ServiceEnvironment; //导入依赖的package包/类
/**
 * This operation returns the per-ServiceEnvironment
 * DomainParticipantFactory singleton. The operation is idempotent, that
 * is, it can be called multiple times without side effects, and each
 * time it will return a DomainParticipantFactory instance that is equal
 * to the previous results.
 * 
 * @param env       Identifies the Service instance to which the
 *                  object will belong.
 */
public static DomainParticipantFactory getInstance(ServiceEnvironment env)
{
    return env.getSPI().getParticipantFactory();
}
 
开发者ID:davnoe,项目名称:dds-psm-java,代码行数:15,代码来源:DomainParticipantFactory.java


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