本文整理汇总了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);
}
示例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);
}
示例3: newKeyedBytes
import org.omg.dds.core.ServiceEnvironment; //导入依赖的package包/类
public static KeyedBytes newKeyedBytes(ServiceEnvironment env)
{
return env.getSPI().newKeyedBytes();
}
示例4: newKeyedString
import org.omg.dds.core.ServiceEnvironment; //导入依赖的package包/类
public static KeyedString newKeyedString(ServiceEnvironment env)
{
return env.getSPI().newKeyedString();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例9: getPolicyFactory
import org.omg.dds.core.ServiceEnvironment; //导入依赖的package包/类
public static PolicyFactory getPolicyFactory(ServiceEnvironment env)
{
return env.getSPI().getPolicyFactory();
}
示例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);
}
示例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();
}