當前位置: 首頁>>代碼示例>>Java>>正文


Java InteractionClassNotDefined類代碼示例

本文整理匯總了Java中hla.rti1516e.exceptions.InteractionClassNotDefined的典型用法代碼示例。如果您正苦於以下問題:Java InteractionClassNotDefined類的具體用法?Java InteractionClassNotDefined怎麽用?Java InteractionClassNotDefined使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


InteractionClassNotDefined類屬於hla.rti1516e.exceptions包,在下文中一共展示了InteractionClassNotDefined類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: updatePublishedInteraction

import hla.rti1516e.exceptions.InteractionClassNotDefined; //導入依賴的package包/類
public void updatePublishedInteraction() throws InteractionClassNotPublished, InteractionParameterNotDefined, InteractionClassNotDefined, SaveInProgress, RestoreInProgress, FederateNotExecutionMember, NotConnected, RTIinternalError {

		
		if(status == ObjectModelStatus.PUBLISHED) {
			Map<String, byte[]> ris = parser.encode(interactionEntity.getElement());
			for(Entry<String, ParameterHandle> entry : mapFieldNameParameterHandle.entrySet())
				parameter_values.put(entry.getValue(), ris.get(entry.getKey()));

			rti_ambassador.sendInteraction(interactionClassHandle, parameter_values, null);
		}
		else{
			logger.error("Can't update the ' "+interactionEntity+" ', because it is not published!");
			throw new IllegalStateException("Can't update the ' "+interactionEntity+" ', because it is not published!");
		}

	}
 
開發者ID:SMASH-Lab,項目名稱:SEE-HLA-Starter-Kit,代碼行數:17,代碼來源:InteractionClassModel.java

示例2: publish

import hla.rti1516e.exceptions.InteractionClassNotDefined; //導入依賴的package包/類
public void publish(Object interaction) throws RTIinternalError, NameNotFound, FederateNotExecutionMember, NotConnected, InvalidInteractionClassHandle, InteractionClassNotDefined, SaveInProgress, RestoreInProgress, InteractionClassNotPublished, InteractionParameterNotDefined {

		InteractionClassModel icm = published.get(interaction.getClass().getAnnotation(InteractionClass.class).name());

		if(icm == null){
			icm = new InteractionClassModel(interaction.getClass());
			icm.addEntity(interaction);
			icm.publish();
			this.published.put(interaction.getClass().getAnnotation(InteractionClass.class).name(), icm);
			this.mapInstanceNameInteractionClassEntity.put(icm.getEntity().getInstanceName(), icm.getEntity());
		}
	}
 
開發者ID:SMASH-Lab,項目名稱:SEE-HLA-Starter-Kit,代碼行數:13,代碼來源:InteractionClassModelManager.java

示例3: subscribe

import hla.rti1516e.exceptions.InteractionClassNotDefined; //導入依賴的package包/類
@SuppressWarnings("unchecked")
public void subscribe(Class interactionClass) throws RTIinternalError, NameNotFound, FederateNotExecutionMember, NotConnected, InvalidInteractionClassHandle, FederateServiceInvocationsAreBeingReportedViaMOM, InteractionClassNotDefined, SaveInProgress, RestoreInProgress, InstantiationException, IllegalAccessException {
	
	InteractionClassModel icm = new InteractionClassModel(interactionClass);
	icm.addEntity(interactionClass.newInstance());
	icm.subscribe();
	this.subscribed.put(((Class<? extends InteractionClass>)interactionClass).getAnnotation(InteractionClass.class).name(), icm);
	this.mapInteractionClassHandleClass.put(icm.getInteractionClassHandle(), interactionClass);
}
 
開發者ID:SMASH-Lab,項目名稱:SEE-HLA-Starter-Kit,代碼行數:10,代碼來源:InteractionClassModelManager.java

示例4: subscribe

import hla.rti1516e.exceptions.InteractionClassNotDefined; //導入依賴的package包/類
public void subscribe() throws FederateServiceInvocationsAreBeingReportedViaMOM, InteractionClassNotDefined, SaveInProgress,
RestoreInProgress, FederateNotExecutionMember, NotConnected, RTIinternalError {

	if(status == ObjectModelStatus.INITIALIZED){

		rti_ambassador.subscribeInteractionClass(this.interactionClassHandle);
		status = ObjectModelStatus.SUBSCRIBED;
	}
	else{
		logger.error("You can't subscribe an uninitialized interaction!");
		throw new IllegalStateException("You can't subscribe an uninitialized interaction!");
	}
}
 
開發者ID:SMASH-Lab,項目名稱:SEE-HLA-Starter-Kit,代碼行數:14,代碼來源:InteractionClassModel.java

示例5: unsubscribe

import hla.rti1516e.exceptions.InteractionClassNotDefined; //導入依賴的package包/類
public void unsubscribe() throws InteractionClassNotDefined, SaveInProgress, RestoreInProgress, FederateNotExecutionMember, NotConnected, RTIinternalError {
	if(status == ObjectModelStatus.SUBSCRIBED){

		rti_ambassador.unsubscribeInteractionClass(this.interactionClassHandle);
		status = ObjectModelStatus.UNKNOWN;
	}
	else{
		logger.error("You can't unsubscribe "+this.interactionClassHandle+" because it is not subscribed");
		throw new IllegalStateException("You can't unsubscribe "+this.interactionClassHandle+" because it is not subscribed");
	}
}
 
開發者ID:SMASH-Lab,項目名稱:SEE-HLA-Starter-Kit,代碼行數:12,代碼來源:InteractionClassModel.java

示例6: publish

import hla.rti1516e.exceptions.InteractionClassNotDefined; //導入依賴的package包/類
public void publish() throws InteractionClassNotDefined, SaveInProgress, RestoreInProgress, FederateNotExecutionMember, NotConnected, RTIinternalError {

		if(status == ObjectModelStatus.INITIALIZED){
			rti_ambassador.publishInteractionClass(interactionClassHandle);
			status = ObjectModelStatus.PUBLISHED;
		}
		else{
			logger.error("You can't publish an uninitialized or an already published InteractionClassModel!");
			throw new IllegalStateException("You can't publish an uninitialized or an already published InteractionClassModel!");
		}
	}
 
開發者ID:SMASH-Lab,項目名稱:SEE-HLA-Starter-Kit,代碼行數:12,代碼來源:InteractionClassModel.java

示例7: unpublish

import hla.rti1516e.exceptions.InteractionClassNotDefined; //導入依賴的package包/類
public void unpublish() throws InteractionClassNotDefined, SaveInProgress, RestoreInProgress, FederateNotExecutionMember, NotConnected, RTIinternalError {

		if(status == ObjectModelStatus.PUBLISHED){
			rti_ambassador.unpublishInteractionClass(interactionClassHandle);
			status = ObjectModelStatus.UNKNOWN;
		}
		else{
			logger.error("You can't unpublish an uninitialized or an unpublished InteractionClassModel!");
			throw new IllegalStateException("You can't unpublish an uninitialized or an unpublished InteractionClassModel!");
		}
	}
 
開發者ID:SMASH-Lab,項目名稱:SEE-HLA-Starter-Kit,代碼行數:12,代碼來源:InteractionClassModel.java

示例8: publishInteraction

import hla.rti1516e.exceptions.InteractionClassNotDefined; //導入依賴的package包/類
@Override
public void publishInteraction(Object interaction) throws RTIinternalError, NameNotFound, FederateNotExecutionMember, NotConnected, InvalidInteractionClassHandle, InteractionClassNotDefined, SaveInProgress, RestoreInProgress, InteractionClassNotPublished, InteractionParameterNotDefined, PublishException {

	if(interactionClassIsValid(interaction.getClass()))
		this.hlamodule.publishInteraction(interaction);
	else{
		logger.error("Interaction: '"+ interaction +"' is not valid!");
		throw new PublishException("Interaction: '"+ interaction +"' is not valid!");
	}
}
 
開發者ID:SMASH-Lab,項目名稱:SEE-HLA-Starter-Kit,代碼行數:11,代碼來源:SEEAbstractFederate.java

示例9: updateInteraction

import hla.rti1516e.exceptions.InteractionClassNotDefined; //導入依賴的package包/類
@Override
public void updateInteraction(Object interaction) throws InteractionClassNotPublished, InteractionParameterNotDefined, InteractionClassNotDefined, SaveInProgress, RestoreInProgress, FederateNotExecutionMember, NotConnected, RTIinternalError, UpdateException {

	if(interactionClassIsValid(interaction.getClass()))
		this.hlamodule.updateInteraction(interaction);
	else{
		logger.error("Interaction: '"+ interaction +"' is not valid!");
		throw new UpdateException("Interaction: '"+ interaction +"' is not valid!");
	}
}
 
開發者ID:SMASH-Lab,項目名稱:SEE-HLA-Starter-Kit,代碼行數:11,代碼來源:SEEAbstractFederate.java

示例10: subscribeInteraction

import hla.rti1516e.exceptions.InteractionClassNotDefined; //導入依賴的package包/類
@Override
@SuppressWarnings({ "rawtypes" })
public void subscribeInteraction(Class interactionClass) throws RTIinternalError, InstantiationException, IllegalAccessException, NameNotFound, FederateNotExecutionMember, NotConnected, InvalidInteractionClassHandle, FederateServiceInvocationsAreBeingReportedViaMOM, InteractionClassNotDefined, SaveInProgress, RestoreInProgress, SubscribeException {

	if(interactionClassIsValid(interactionClass))
		this.hlamodule.subscribeInteractionObject(interactionClass);
	else{
		logger.error("Interaction: '"+ interactionClass +"' is not valid!");
		throw new SubscribeException("Interaction: '"+ interactionClass +"' is not valid!");
	}

}
 
開發者ID:SMASH-Lab,項目名稱:SEE-HLA-Starter-Kit,代碼行數:13,代碼來源:SEEAbstractFederate.java

示例11: unsubscribeInteraction

import hla.rti1516e.exceptions.InteractionClassNotDefined; //導入依賴的package包/類
@Override
@SuppressWarnings({ "rawtypes" })
public void unsubscribeInteraction(Class interactionClass) throws InteractionClassNotDefined, SaveInProgress, RestoreInProgress, FederateNotExecutionMember, NotConnected, RTIinternalError, UnsubscribeException {

	if(interactionClassIsValid(interactionClass))
		this.hlamodule.unsubscribeInteractionObject(interactionClass);
	else{
		logger.error("Interaction: '"+ interactionClass +"' is not valid!");
		throw new UnsubscribeException("Interaction: '"+ interactionClass +"' is not valid!");
	}
}
 
開發者ID:SMASH-Lab,項目名稱:SEE-HLA-Starter-Kit,代碼行數:12,代碼來源:SEEAbstractFederate.java

示例12: publishInteraction

import hla.rti1516e.exceptions.InteractionClassNotDefined; //導入依賴的package包/類
public void publishInteraction(Object interaction) throws PublishException, RTIinternalError, NameNotFound, FederateNotExecutionMember, NotConnected, InvalidInteractionClassHandle, InteractionClassNotDefined, SaveInProgress, RestoreInProgress, InteractionClassNotPublished, InteractionParameterNotDefined {

		if(!fedamb.interactionClassEntityIsAlreadyPublished(interaction)){
			fedamb.publishInteractionClassEntity(interaction);
			logger.info("The Interaction ' "+interaction+" ' has been published.");
		}
		else{
			logger.warn("Interaction: "+interaction+", is already published");
			throw new PublishException("Interaction: "+interaction+", is already published.");
		}
	}
 
開發者ID:SMASH-Lab,項目名稱:SEE-HLA-Starter-Kit,代碼行數:12,代碼來源:SEEHLAModule.java

示例13: updateInteraction

import hla.rti1516e.exceptions.InteractionClassNotDefined; //導入依賴的package包/類
public void updateInteraction(Object interaction) throws InteractionClassNotPublished, InteractionParameterNotDefined, InteractionClassNotDefined, SaveInProgress, RestoreInProgress, FederateNotExecutionMember, NotConnected, RTIinternalError, UpdateException {


		if(fedamb.interactionClassEntityIsAlreadyPublished(interaction)){
			fedamb.updateInteractionClassEntityOnRTI(interaction);
			logger.info("The Interaction ' "+interaction+" ' has been updated on the HLA/RTI platform.");
		}
		else{
			logger.warn("Interaction: "+interaction+", not published.");
			throw new UpdateException("You can't update an unpublished interaction.");
		}

	}
 
開發者ID:SMASH-Lab,項目名稱:SEE-HLA-Starter-Kit,代碼行數:14,代碼來源:SEEHLAModule.java

示例14: subscribeInteractionObject

import hla.rti1516e.exceptions.InteractionClassNotDefined; //導入依賴的package包/類
@SuppressWarnings("rawtypes")
public void subscribeInteractionObject(Class interactionClass) throws RTIinternalError, NameNotFound, FederateNotExecutionMember, NotConnected, InvalidInteractionClassHandle, FederateServiceInvocationsAreBeingReportedViaMOM, InteractionClassNotDefined, SaveInProgress, RestoreInProgress, InstantiationException, IllegalAccessException  {

	if(!fedamb.interactionClassModelIsAlreadySubscribed(interactionClass)){
		fedamb.subscribeInteractionClassModel(interactionClass);
		logger.info("The InteractionClass ' "+interactionClass+" ' has been subscribed.");
	}
	else
		logger.warn("The InteractionClass ' "+interactionClass+" ' is already subscribed.");
}
 
開發者ID:SMASH-Lab,項目名稱:SEE-HLA-Starter-Kit,代碼行數:11,代碼來源:SEEHLAModule.java

示例15: unsubscribeInteractionObject

import hla.rti1516e.exceptions.InteractionClassNotDefined; //導入依賴的package包/類
@SuppressWarnings("rawtypes")
public void unsubscribeInteractionObject(Class interactionClass) throws InteractionClassNotDefined, SaveInProgress, RestoreInProgress, FederateNotExecutionMember, NotConnected, RTIinternalError, UnsubscribeException {

	if(fedamb.interactionClassModelIsAlreadySubscribed(interactionClass)){
		fedamb.unsubscribeInteractionClassModel(interactionClass);
		logger.info("The InteractionClass '"+interactionClass+" ' has been unsubscribed.");
	}
	else{	
		logger.error("Error during unsubscribe the "+interactionClass);
		throw new UnsubscribeException("Error during unsubscribe the "+interactionClass);
	}
}
 
開發者ID:SMASH-Lab,項目名稱:SEE-HLA-Starter-Kit,代碼行數:13,代碼來源:SEEHLAModule.java


注:本文中的hla.rti1516e.exceptions.InteractionClassNotDefined類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。