![JAR search and dependency download from the Maven repository](/logo.png)
net.sf.jrtps.udds.EntityFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jrtps Show documentation
Show all versions of jrtps Show documentation
jRTPS - An implementation of RTPS protocol by OMG
package net.sf.jrtps.udds;
import net.sf.jrtps.rtps.RTPSReader;
import net.sf.jrtps.rtps.RTPSWriter;
/**
* EntityFactory is used to create instances of uDDS entities.
* By giving an instance of EntityFactory to Participant, one
* can provide customized entities to application.
*
* @see Participant#Participant(int, int, EntityFactory, net.sf.jrtps.Configuration)
* @see Participant#setEntityFactory(EntityFactory)
*
* @author mcr70
*/
public class EntityFactory {
/**
* Empty constructor.
*/
protected EntityFactory() {
}
/**
* Create a new DataWriter.
* @param p Participant that is parent of created DataWriter
* @param type a Class representing the type of writer
* @param rtpsWriter RTPSWriter to be associated with created DataWriter
* @param hCache HistoryCache of DataWriter
* @return DataWriter
*/
protected DataWriter createDataWriter(Participant p, Class type, RTPSWriter rtpsWriter,
HistoryCache hCache) {
return new DataWriter<>(p, type, rtpsWriter, hCache);
}
/**
* Create a new DataReader.
* @param p Participant that is parent of created DataReader
* @param type a Class representing the type of reader
* @param rtpsReader RTPSReader to be associated with created DataReader
* @return DataReader
*/
protected DataReader createDataReader(Participant p, Class type, RTPSReader rtpsReader) {
return new DataReader<>(p, type, rtpsReader);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy