ohla-devel Mailing List for Open HLA (Page 2)
Status: Beta
Brought to you by:
mnewcomb
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(5) |
Apr
(8) |
May
|
Jun
(1) |
Jul
|
Aug
(3) |
Sep
(6) |
Oct
(7) |
Nov
(65) |
Dec
(21) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(13) |
Feb
(34) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: <mne...@us...> - 2007-02-12 17:22:31
|
Revision: 107 http://svn.sourceforge.net/ohla/?rev=107&view=rev Author: mnewcomb Date: 2007-02-12 09:22:14 -0800 (Mon, 12 Feb 2007) Log Message: ----------- - removed extra lock on the Time lock Modified Paths: -------------- trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java 2007-02-09 17:08:56 UTC (rev 106) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java 2007-02-12 17:22:14 UTC (rev 107) @@ -467,156 +467,148 @@ boolean processed = true; if (message instanceof Callback) { - timeManager.getTimeLock().readLock().lock(); - try + if (message instanceof ReflectAttributeValues) { - if (message instanceof ReflectAttributeValues) + ReflectAttributeValues reflectAttributeValues = + (ReflectAttributeValues) message; + + timeManager.getTimeLock().readLock().lock(); + try { - ReflectAttributeValues reflectAttributeValues = - (ReflectAttributeValues) message; + OrderType receivedOrderType = + reflectAttributeValues.getSentOrderType() == OrderType.TIMESTAMP && + timeManager.isTimeConstrained() ? OrderType.TIMESTAMP : + OrderType.RECEIVE; + reflectAttributeValues.setReceivedOrderType(receivedOrderType); - timeManager.getTimeLock().readLock().lock(); - try + if (receivedOrderType == OrderType.RECEIVE) { - OrderType receivedOrderType = - reflectAttributeValues.getSentOrderType() == OrderType.TIMESTAMP && - timeManager.isTimeConstrained() ? OrderType.TIMESTAMP : - OrderType.RECEIVE; - reflectAttributeValues.setReceivedOrderType(receivedOrderType); + // receive order callbacks need to be held until released if we + // are constrained and in the time granted state if asynchronous + // delivery is disabled + // + boolean hold = timeManager.isTimeConstrainedAndTimeGranted() && + !isAsynchronousDeliveryEnabled(); - if (receivedOrderType == OrderType.RECEIVE) - { - // receive order callbacks need to be held until released if we - // are constrained and in the time granted state if asynchronous - // delivery is disabled - // - boolean hold = timeManager.isTimeConstrainedAndTimeGranted() && - !isAsynchronousDeliveryEnabled(); - - callbackManager.add(reflectAttributeValues, hold); - } - else - { - // schedule the callback for the appropriate time - // - Future future = schedule( - reflectAttributeValues.getUpdateTime(), - new AddCallback(reflectAttributeValues)); - - // register the message retraction handle - // - messageRetractionManager.add( - reflectAttributeValues.getUpdateTime(), future, - reflectAttributeValues.getMessageRetractionHandle()); - } + callbackManager.add(reflectAttributeValues, hold); } - finally + else { - timeManager.getTimeLock().readLock().unlock(); + // schedule the callback for the appropriate time + // + Future future = schedule( + reflectAttributeValues.getUpdateTime(), + new AddCallback(reflectAttributeValues)); + + // register the message retraction handle + // + messageRetractionManager.add( + reflectAttributeValues.getUpdateTime(), future, + reflectAttributeValues.getMessageRetractionHandle()); } } - else if (message instanceof ReceiveInteraction) + finally { - ReceiveInteraction receiveInteraction = (ReceiveInteraction) message; + timeManager.getTimeLock().readLock().unlock(); + } + } + else if (message instanceof ReceiveInteraction) + { + ReceiveInteraction receiveInteraction = (ReceiveInteraction) message; - timeManager.getTimeLock().readLock().lock(); - try - { - OrderType receivedOrderType = - receiveInteraction.getSentOrderType() == OrderType.TIMESTAMP && - timeManager.isTimeConstrained() ? OrderType.TIMESTAMP : - OrderType.RECEIVE; + timeManager.getTimeLock().readLock().lock(); + try + { + OrderType receivedOrderType = + receiveInteraction.getSentOrderType() == OrderType.TIMESTAMP && + timeManager.isTimeConstrained() ? OrderType.TIMESTAMP : + OrderType.RECEIVE; - receiveInteraction.setReceivedOrderType(receivedOrderType); + receiveInteraction.setReceivedOrderType(receivedOrderType); - if (receivedOrderType == OrderType.RECEIVE) - { - // receive order callbacks need to be held until released if we - // are constrained and in the time granted state, if asynchronous - // delivery is disabled - // - boolean hold = timeManager.isTimeConstrainedAndTimeGranted() && - !isAsynchronousDeliveryEnabled(); + if (receivedOrderType == OrderType.RECEIVE) + { + // receive order callbacks need to be held until released if we + // are constrained and in the time granted state, if asynchronous + // delivery is disabled + // + boolean hold = timeManager.isTimeConstrainedAndTimeGranted() && + !isAsynchronousDeliveryEnabled(); - callbackManager.add(receiveInteraction, hold); - } - else - { - // schedule the callback for the appropriate time - // - Future future = schedule(receiveInteraction.getSendTime(), - new AddCallback(receiveInteraction)); - - // register the message retraction handle - // - messageRetractionManager.add( - receiveInteraction.getSendTime(), future, - receiveInteraction.getMessageRetractionHandle()); - } + callbackManager.add(receiveInteraction, hold); } - finally + else { - timeManager.getTimeLock().readLock().unlock(); + // schedule the callback for the appropriate time + // + Future future = schedule(receiveInteraction.getSendTime(), + new AddCallback(receiveInteraction)); + + // register the message retraction handle + // + messageRetractionManager.add( + receiveInteraction.getSendTime(), future, + receiveInteraction.getMessageRetractionHandle()); } } - else if (message instanceof RemoveObjectInstance) + finally { - RemoveObjectInstance removeObjectInstance = - (RemoveObjectInstance) message; + timeManager.getTimeLock().readLock().unlock(); + } + } + else if (message instanceof RemoveObjectInstance) + { + RemoveObjectInstance removeObjectInstance = + (RemoveObjectInstance) message; - timeManager.getTimeLock().readLock().lock(); - try - { - OrderType receivedOrderType = - removeObjectInstance.getSentOrderType() == OrderType.TIMESTAMP && - timeManager.isTimeConstrained() ? OrderType.TIMESTAMP : - OrderType.RECEIVE; + timeManager.getTimeLock().readLock().lock(); + try + { + OrderType receivedOrderType = + removeObjectInstance.getSentOrderType() == OrderType.TIMESTAMP && + timeManager.isTimeConstrained() ? OrderType.TIMESTAMP : + OrderType.RECEIVE; - removeObjectInstance.setReceivedOrderType(receivedOrderType); + removeObjectInstance.setReceivedOrderType(receivedOrderType); - if (receivedOrderType == OrderType.RECEIVE) - { - // receive order callbacks need to be held until released if we - // are constrained and in the time granted state, if asynchronous - // delivery is disabled - // - boolean hold = timeManager.isTimeConstrainedAndTimeGranted() && - !isAsynchronousDeliveryEnabled(); + if (receivedOrderType == OrderType.RECEIVE) + { + // receive order callbacks need to be held until released if we + // are constrained and in the time granted state, if asynchronous + // delivery is disabled + // + boolean hold = timeManager.isTimeConstrainedAndTimeGranted() && + !isAsynchronousDeliveryEnabled(); - callbackManager.add(removeObjectInstance, hold); - } - else - { - // schedule the callback for the appropriate time - // - Future future = schedule(removeObjectInstance.getDeleteTime(), - new AddCallback(removeObjectInstance)); - - // register the message retraction handle - // - messageRetractionManager.add( - removeObjectInstance.getDeleteTime(), future, - removeObjectInstance.getMessageRetractionHandle()); - } + callbackManager.add(removeObjectInstance, hold); } - finally + else { - timeManager.getTimeLock().readLock().unlock(); + // schedule the callback for the appropriate time + // + Future future = schedule(removeObjectInstance.getDeleteTime(), + new AddCallback(removeObjectInstance)); + + // register the message retraction handle + // + messageRetractionManager.add( + removeObjectInstance.getDeleteTime(), future, + removeObjectInstance.getMessageRetractionHandle()); } } - else + finally { - if (message instanceof TimeAdvanceGrant) - { - processFutureTasks(((TimeAdvanceGrant) message).getTime()); - } - - callbackManager.add((Callback) message); + timeManager.getTimeLock().readLock().unlock(); } } - finally + else { - timeManager.getTimeLock().readLock().unlock(); + if (message instanceof TimeAdvanceGrant) + { + processFutureTasks(((TimeAdvanceGrant) message).getTime()); + } + + callbackManager.add((Callback) message); } } else if (message instanceof GALTAdvanced) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mne...@us...> - 2007-02-09 17:08:57
|
Revision: 106 http://svn.sourceforge.net/ohla/?rev=106&view=rev Author: mnewcomb Date: 2007-02-09 09:08:56 -0800 (Fri, 09 Feb 2007) Log Message: ----------- - added HLA 1.3 LogicalTime factory properties Modified Paths: -------------- trunk/build/build.xml Modified: trunk/build/build.xml =================================================================== --- trunk/build/build.xml 2007-02-09 16:28:42 UTC (rev 105) +++ trunk/build/build.xml 2007-02-09 17:08:56 UTC (rev 106) @@ -359,14 +359,14 @@ <jvmarg value="-Dohla.rti.host=localhost"/> <jvmarg value="-Dohla.rti.port=5000"/> - <!--<jvmarg value="-Dohla.federate.Test Federate.host=localhost"/>--> - <!--<jvmarg value="-Dohla.federate.Test Federate.port=5001"/>--> -<!----> - <!--<jvmarg value="-Dohla.federate.Test Federate2.host=localhost"/>--> - <!--<jvmarg value="-Dohla.federate.Test Federate2.port=5002"/>--> -<!----> - <!--<jvmarg value="-Dohla.federate.Test Federate3.host=localhost"/>--> - <!--<jvmarg value="-Dohla.federate.Test Federate3.port=5003"/>--> + <sysproperty key="ohla.federate.rti.logicalTimeFactory" + value="net.sf.ohla.rti.Integer64TimeFactory"/> + <sysproperty key="ohla.federate.rti.logicalTimeIntervalFactory" + value="net.sf.ohla.rti.Integer64TimeIntervalFactory"/> + <sysproperty key="ohla.federate.rti1516.logicalTimeFactory" + value="net.sf.ohla.rti1516.Integer64TimeFactory"/> + <sysproperty key="ohla.federate.rti1516.logicalTimeIntervalFactory" + value="net.sf.ohla.rti1516.Integer64TimeIntervalFactory"/> </testng> </target> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mne...@us...> - 2007-02-09 16:28:48
|
Revision: 105 http://svn.sourceforge.net/ohla/?rev=105&view=rev Author: mnewcomb Date: 2007-02-09 08:28:42 -0800 (Fri, 09 Feb 2007) Log Message: ----------- - all tests passing Modified Paths: -------------- trunk/build/intellij/OHLA.iws trunk/resources/logback-test.xml trunk/resources/testsuite/ieee-1516-testng.xml trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/TimeAdvanceGrant.java trunk/testsuite/src/java/net/sf/ohla/rti1516/TimeManagementTestNG.java Modified: trunk/build/intellij/OHLA.iws =================================================================== --- trunk/build/intellij/OHLA.iws 2007-02-08 19:24:14 UTC (rev 104) +++ trunk/build/intellij/OHLA.iws 2007-02-09 16:28:42 UTC (rev 105) @@ -20,32 +20,13 @@ </component> <component name="ChangeListManager"> <list default="true" name="Default" comment=""> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/ObjectManagementTestNG.java" afterPath="$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/ObjectManagementTestNG.java" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/OHLA.iml" afterPath="$PROJECT_DIR$/OHLA.iml" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../resources/logback-test.xml" afterPath="$PROJECT_DIR$/../../resources/logback-test.xml" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../resources/testsuite/ieee-1516-testng.xml" afterPath="$PROJECT_DIR$/../../resources/testsuite/ieee-1516-testng.xml" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/Federate.java" afterPath="$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/Federate.java" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/time/TimeKeeper.java" afterPath="$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/time/TimeKeeper.java" /> - <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/../../thirdparty/logback/LICENSE.txt" /> - <change type="DELETED" beforePath="D:\projects\ohla-0.4\resources\properties\log4j.properties" afterPath="" /> - <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/../../resources/logback-test.xml" /> - <change type="DELETED" beforePath="D:\projects\ohla-0.4\rti\src\java\net\sf\ohla\rti1516\federation\time\TimeConstrainedFederate.java" afterPath="" /> - <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/../../thirdparty/logback/lib/logback-core-0.9.jar" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/RTI.iml" afterPath="$PROJECT_DIR$/RTI.iml" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/IEEE 1516.iml" afterPath="$PROJECT_DIR$/IEEE 1516.iml" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../build.xml" afterPath="$PROJECT_DIR$/../build.xml" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java" afterPath="$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/messages/callbacks/TimeAdvanceGrant.java" afterPath="$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/messages/callbacks/TimeAdvanceGrant.java" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/TimeManagementTestNG.java" afterPath="$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/TimeManagementTestNG.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/OHLA.iws" afterPath="$PROJECT_DIR$/OHLA.iws" /> - <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/../../thirdparty/logback" /> - <change type="DELETED" beforePath="D:\projects\ohla-0.4\rti\src\java\net\sf\ohla\rti1516\federation\time\TimeRegulatingFederate.java" afterPath="" /> - <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/../../thirdparty/logback/lib/logback-classic-0.9.jar" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/Federate.java" afterPath="$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/Federate.java" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/time/TimeManager.java" afterPath="$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/time/TimeManager.java" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../resources/testsuite/ieee-1516-testng.xml" afterPath="$PROJECT_DIR$/../../resources/testsuite/ieee-1516-testng.xml" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/OHLA.ipr" afterPath="$PROJECT_DIR$/OHLA.ipr" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/OwnershipManagementTestNG.java" afterPath="$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/OwnershipManagementTestNG.java" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/FederationManagementTestNG.java" afterPath="$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/FederationManagementTestNG.java" /> - <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/../../thirdparty/logback/lib" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/HLA 1.3.iml" afterPath="$PROJECT_DIR$/HLA 1.3.iml" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/TimeManagementTestNG.java" afterPath="$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/TimeManagementTestNG.java" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Testsuite.iml" afterPath="$PROJECT_DIR$/Testsuite.iml" /> </list> <list name="Failed commit: Default" comment="- removed log4j" /> </component> @@ -242,46 +223,48 @@ </component> <component name="FileEditorManager"> <leaf> - <file leaf-file-name="ObjectManagementTestNG.java" pinned="false" current="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/ObjectManagementTestNG.java"> + <file leaf-file-name="Federate.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/Federate.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="481" column="39" selection-start="17964" selection-end="17964" vertical-scroll-proportion="0.021573603"> - <folding /> + <state line="428" column="14" selection-start="16700" selection-end="16700" vertical-scroll-proportion="0.33252132"> + <folding> + <element signature="imports" expanded="true" /> + </folding> </state> </provider> </entry> </file> - <file leaf-file-name="OwnershipManagementTestNG.java" pinned="false" current="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/OwnershipManagementTestNG.java"> + <file leaf-file-name="ObjectManagementTestNG.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/ObjectManagementTestNG.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="550" column="0" selection-start="19642" selection-end="19642" vertical-scroll-proportion="0.021573603"> + <state line="15" column="0" selection-start="605" selection-end="605" vertical-scroll-proportion="0.020706456"> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="SupportServicesTestNG.java" pinned="false" current="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/SupportServicesTestNG.java"> + <file leaf-file-name="TimeAdvanceGrant.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/messages/callbacks/TimeAdvanceGrant.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="43" column="13" selection-start="1566" selection-end="1566" vertical-scroll-proportion="0.021573603"> + <state line="35" column="3" selection-start="1062" selection-end="1062" vertical-scroll-proportion="0.35200974"> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="Federate.java" pinned="false" current="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/Federate.java"> + <file leaf-file-name="TimeManager.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/time/TimeManager.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="338" column="38" selection-start="9390" selection-end="9390" vertical-scroll-proportion="0.021573603"> + <state line="675" column="14" selection-start="18064" selection-end="18064" vertical-scroll-proportion="0.39464068"> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="ieee-1516-testng.xml" pinned="false" current="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/../../resources/testsuite/ieee-1516-testng.xml"> + <file leaf-file-name="OHLARTIambassador.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/OHLARTIambassador.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0"> + <state line="2938" column="0" selection-start="79846" selection-end="79846" vertical-scroll-proportion="0.020706456"> <folding /> </state> </provider> @@ -299,25 +282,34 @@ <file leaf-file-name="TimeManagementTestNG.java" pinned="false" current="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/TimeManagementTestNG.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="626" column="13" selection-start="23219" selection-end="23219" vertical-scroll-proportion="0.021573603"> + <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0"> <folding /> </state> </provider> </entry> </file> + <file leaf-file-name="ieee-1516-testng.xml" pinned="false" current="true" current-in-tab="true"> + <entry file="file://$PROJECT_DIR$/../../resources/testsuite/ieee-1516-testng.xml"> + <provider selected="true" editor-type-id="text-editor"> + <state line="22" column="9" selection-start="909" selection-end="909" vertical-scroll-proportion="0.041412912"> + <folding /> + </state> + </provider> + </entry> + </file> <file leaf-file-name="logback-test.xml" pinned="false" current="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/../../resources/logback-test.xml"> <provider selected="true" editor-type-id="text-editor"> - <state line="20" column="54" selection-start="839" selection-end="839" vertical-scroll-proportion="0.4314721"> + <state line="24" column="46" selection-start="945" selection-end="945" vertical-scroll-proportion="0.35200974"> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="build.xml" pinned="false" current="true" current-in-tab="true"> + <file leaf-file-name="build.xml" pinned="false" current="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/../build.xml"> <provider selected="true" editor-type-id="text-editor"> - <state line="44" column="0" selection-start="1897" selection-end="1897" vertical-scroll-proportion="0.35406092"> + <state line="44" column="0" selection-start="1897" selection-end="1897" vertical-scroll-proportion="0.020706456"> <folding /> </state> </provider> @@ -829,6 +821,10 @@ <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4\thirdparty\apache" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4\thirdparty\apache\mina" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> </PATH> <PATH> <PATH_ELEMENT> @@ -849,7 +845,7 @@ <showLibraryContents /> <hideEmptyPackages ProjectPane="true" /> <abbreviatePackageNames /> - <showStructure PackagesPane="false" ProjectPane="false" Scope="false" Favorites="false" /> + <showStructure Favorites="false" PackagesPane="false" Scope="false" ProjectPane="false" /> <autoscrollToSource /> <autoscrollFromSource /> <sortByType /> @@ -868,8 +864,8 @@ <property name="cvs_file_history_flatOrder1" value="1" /> <property name="cvs_file_history_flatWidth1" value="299" /> <property name="cvs_file_history_treeWidth1" value="299" /> + <property name="cvs_file_history_treeOrder2" value="2" /> <property name="cvs_file_history_treeWidth3" value="298" /> - <property name="cvs_file_history_treeOrder2" value="2" /> <property name="GoToClass.includeLibraries" value="false" /> <property name="cvs_file_history_flatOrder2" value="2" /> <property name="MemberChooser.showClasses" value="true" /> @@ -878,8 +874,8 @@ <property name="cvs_file_history_treeWidth2" value="299" /> <property name="cvs_file_history_flatOrder3" value="3" /> <property name="GoToClass.toSaveIncludeLibraries" value="false" /> + <property name="RunManagerConfig.showSettingsBeforeRunnig" value="true" /> <property name="cvs_file_history_treeOrder0" value="0" /> - <property name="RunManagerConfig.showSettingsBeforeRunnig" value="true" /> </component> <component name="ReadonlyStatusHandler"> <option name="SHOW_DIALOG" value="true" /> @@ -895,6 +891,25 @@ </component> <component name="RestoreUpdateTree" /> <component name="RunManager" selected="Application.RTI"> + <configuration default="true" type="Remote" factoryName="Remote"> + <option name="USE_SOCKET_TRANSPORT" value="true" /> + <option name="SERVER_MODE" value="false" /> + <option name="SHMEM_ADDRESS" value="javadebug" /> + <option name="HOST" value="localhost" /> + <option name="PORT" value="5005" /> + </configuration> + <configuration default="true" type="Applet" factoryName="Applet"> + <module name="" /> + <option name="MAIN_CLASS_NAME" /> + <option name="HTML_FILE_NAME" /> + <option name="HTML_USED" value="false" /> + <option name="WIDTH" value="400" /> + <option name="HEIGHT" value="300" /> + <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" /> + <option name="VM_PARAMETERS" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + </configuration> <configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false"> <option name="MAIN_CLASS_NAME" /> <option name="VM_PARAMETERS" /> @@ -927,25 +942,6 @@ <option name="Make" value="true" /> </method> </configuration> - <configuration default="true" type="Applet" factoryName="Applet"> - <module name="" /> - <option name="MAIN_CLASS_NAME" /> - <option name="HTML_FILE_NAME" /> - <option name="HTML_USED" value="false" /> - <option name="WIDTH" value="400" /> - <option name="HEIGHT" value="300" /> - <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" /> - <option name="VM_PARAMETERS" /> - <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> - <option name="ALTERNATIVE_JRE_PATH" /> - </configuration> - <configuration default="true" type="Remote" factoryName="Remote"> - <option name="USE_SOCKET_TRANSPORT" value="true" /> - <option name="SERVER_MODE" value="false" /> - <option name="SHMEM_ADDRESS" value="javadebug" /> - <option name="HOST" value="localhost" /> - <option name="PORT" value="5005" /> - </configuration> <configuration default="false" name="RTI" type="Application" factoryName="Application" enabled="false" merge="false"> <option name="MAIN_CLASS_NAME" value="net.sf.ohla.rti1516.RTI" /> <option name="VM_PARAMETERS" value="-ea -server" /> @@ -1043,22 +1039,144 @@ <option name="myItemId" value="" /> <option name="myItemType" value="" /> </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="Testsuite"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="testsuite/src/java/net/sf/ohla"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="rti1516"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> </PATH> <PATH> <PATH_ELEMENT USER_OBJECT="Root"> <option name="myItemId" value="" /> <option name="myItemType" value="" /> </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="Testsuite"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="testsuite/src/java/net/sf/ohla"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT USER_OBJECT="Root"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> <PATH_ELEMENT USER_OBJECT="RTI"> <option name="myItemId" value="" /> <option name="myItemType" value="" /> </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="rti/src/java"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="net/sf/ohla"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="rti1516"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> </PATH> <PATH> <PATH_ELEMENT USER_OBJECT="Root"> <option name="myItemId" value="" /> <option name="myItemType" value="" /> </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="RTI"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="rti/src/java"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="net/sf/ohla"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="rti1516"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="federation"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT USER_OBJECT="Root"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="RTI"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="rti/src/java"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="net/sf/ohla"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="rti1516"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="federate"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT USER_OBJECT="Root"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="RTI"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="rti/src/java"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="net/sf/ohla"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT USER_OBJECT="Root"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="RTI"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="rti/src/java"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT USER_OBJECT="Root"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> <PATH_ELEMENT USER_OBJECT="OHLA"> <option name="myItemId" value="" /> <option name="myItemType" value="" /> @@ -1086,6 +1204,34 @@ <option name="myItemType" value="" /> </PATH_ELEMENT> </PATH> + <PATH> + <PATH_ELEMENT USER_OBJECT="Root"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="OHLA"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="D:\projects\ohla-0.4"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="resources"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + <PATH_ELEMENT USER_OBJECT="testsuite"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT USER_OBJECT="Root"> + <option name="myItemId" value="" /> + <option name="myItemType" value="" /> + </PATH_ELEMENT> + </PATH> </subPane> </component> <component name="SelectInManager" /> @@ -1161,7 +1307,7 @@ <window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" /> <window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32791588" order="7" /> - <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.35279804" order="0" /> + <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.30738038" order="0" /> <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.34367815" order="1" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="1" /> <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32413793" order="8" /> @@ -1169,7 +1315,7 @@ <window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" /> <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32988507" order="8" /> <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" /> - <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.15490673" order="1" /> + <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.15490673" order="1" /> <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" /> <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.27816093" order="2" /> <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" /> @@ -1215,7 +1361,7 @@ <option name="PERFORM_COMMIT_IN_BACKGROUND" value="false" /> <option name="PUT_FOCUS_INTO_COMMENT" value="false" /> <option name="FORCE_NON_EMPTY_COMMENT" value="false" /> - <option name="LAST_COMMIT_MESSAGE" value="- removed log4j" /> + <option name="LAST_COMMIT_MESSAGE" value="- all but 1 time management test passes" /> <option name="SAVE_LAST_COMMIT_MESSAGE" value="true" /> <option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" /> <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" /> @@ -1223,12 +1369,11 @@ <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" /> <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" /> <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" /> - <option name="ERROR_OCCURED" value="true" /> + <option name="ERROR_OCCURED" value="false" /> <option name="ACTIVE_VCS_NAME" value="svn" /> <option name="UPDATE_GROUP_BY_PACKAGES" value="false" /> <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" /> <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" /> - <MESSAGE value="- refactored some method names" /> <MESSAGE value="- fix for removed statics from RTI.java" /> <MESSAGE value="removed duplicate text from thrown exceptions" /> <MESSAGE value="- almost complete refactor to centralized RTI" /> @@ -1238,6 +1383,7 @@ <MESSAGE value="- Federation Management, Support Services, Declaration Management, and Object Management unit test cases passing" /> <MESSAGE value="- removed uncessary delay" /> <MESSAGE value="- removed log4j" /> + <MESSAGE value="- all but 1 time management test passes" /> </component> <component name="VssConfiguration"> <option name="CLIENT_PATH" value="" /> @@ -1320,79 +1466,88 @@ <option name="myLastEditedConfigurable" /> </component> <component name="editorHistoryManager"> - <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/time/TimeManager.java"> + <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/OwnershipManagementTestNG.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="251" column="14" selection-start="7030" selection-end="7030" vertical-scroll-proportion="0.02117061"> + <state line="550" column="0" selection-start="19642" selection-end="19642" vertical-scroll-proportion="0.020706456"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/time/TimeKeeper.java"> + <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/SupportServicesTestNG.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="174" column="0" selection-start="3895" selection-end="3895" vertical-scroll-proportion="0.02117061"> + <state line="43" column="13" selection-start="1566" selection-end="1566" vertical-scroll-proportion="0.020706456"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/DataDistributionManagementTestNG.java"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="126" column="13" selection-start="4144" selection-end="4144" vertical-scroll-proportion="0.02117061"> + <state line="152" column="0" selection-start="7195" selection-end="7239" vertical-scroll-proportion="0.020706456"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/DeclarationManagementTestNG.java"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/RTI.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="31" column="13" selection-start="1104" selection-end="1104" vertical-scroll-proportion="0.02117061"> + <state line="109" column="28" selection-start="3668" selection-end="3668" vertical-scroll-proportion="0.020706456"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/FederationManagementTestNG.java"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/OHLARTIambassador.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="316" column="40" selection-start="10953" selection-end="10953" vertical-scroll-proportion="0.022077922"> + <state line="2938" column="0" selection-start="79846" selection-end="79846" vertical-scroll-proportion="0.020706456"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/ObjectManagementTestNG.java"> + <entry file="file://$PROJECT_DIR$/../build.xml"> <provider selected="true" editor-type-id="text-editor"> - <state line="481" column="39" selection-start="17964" selection-end="17964" vertical-scroll-proportion="0.021573603"> + <state line="44" column="0" selection-start="1897" selection-end="1897" vertical-scroll-proportion="0.020706456"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/OwnershipManagementTestNG.java"> + <entry file="file://$PROJECT_DIR$/../../resources/logback-test.xml"> <provider selected="true" editor-type-id="text-editor"> - <state line="550" column="0" selection-start="19642" selection-end="19642" vertical-scroll-proportion="0.021573603"> + <state line="24" column="46" selection-start="945" selection-end="945" vertical-scroll-proportion="0.35200974"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/SupportServicesTestNG.java"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/time/TimeManager.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="43" column="13" selection-start="1566" selection-end="1566" vertical-scroll-proportion="0.021573603"> + <state line="675" column="14" selection-start="18064" selection-end="18064" vertical-scroll-proportion="0.39464068"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/TimeManagementTestNG.java"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/Federate.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="626" column="13" selection-start="23219" selection-end="23219" vertical-scroll-proportion="0.021573603"> + <state line="78" column="0" selection-start="3168" selection-end="3201" vertical-scroll-proportion="0.020706456"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/Federate.java"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/messages/callbacks/TimeAdvanceGrant.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="338" column="38" selection-start="9390" selection-end="9390" vertical-scroll-proportion="0.021573603"> + <state line="35" column="3" selection-start="1062" selection-end="1062" vertical-scroll-proportion="0.35200974"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../resources/testsuite/ieee-1516-testng.xml"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/Federate.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0"> + <state line="428" column="14" selection-start="16700" selection-end="16700" vertical-scroll-proportion="0.33252132"> + <folding> + <element signature="imports" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/ObjectManagementTestNG.java"> + <provider selected="true" editor-type-id="text-editor"> + <state line="15" column="0" selection-start="605" selection-end="605" vertical-scroll-proportion="0.020706456"> <folding /> </state> </provider> @@ -1404,16 +1559,16 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../resources/logback-test.xml"> + <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/TimeManagementTestNG.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="20" column="54" selection-start="839" selection-end="839" vertical-scroll-proportion="0.4314721"> + <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../build.xml"> + <entry file="file://$PROJECT_DIR$/../../resources/testsuite/ieee-1516-testng.xml"> <provider selected="true" editor-type-id="text-editor"> - <state line="44" column="0" selection-start="1897" selection-end="1897" vertical-scroll-proportion="0.35406092"> + <state line="22" column="9" selection-start="909" selection-end="909" vertical-scroll-proportion="0.041412912"> <folding /> </state> </provider> Modified: trunk/resources/logback-test.xml =================================================================== --- trunk/resources/logback-test.xml 2007-02-08 19:24:14 UTC (rev 104) +++ trunk/resources/logback-test.xml 2007-02-09 16:28:42 UTC (rev 105) @@ -22,6 +22,10 @@ </layout> </appender> + <logger name="org.apache.mina.filter.executor.ExecutorFilter"> + <level value="INFO"/> + </logger> + <root> <level value="debug"/> <appender-ref ref="STDOUT"/> Modified: trunk/resources/testsuite/ieee-1516-testng.xml =================================================================== --- trunk/resources/testsuite/ieee-1516-testng.xml 2007-02-08 19:24:14 UTC (rev 104) +++ trunk/resources/testsuite/ieee-1516-testng.xml 2007-02-09 16:28:42 UTC (rev 105) @@ -16,35 +16,35 @@ <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > <suite name="OHLA IEEE 1516 Testsuite" parallel="false" verbose="5"> - <!--<test name="IEEE 1516 - Federation Management">--> - <!--<classes>--> - <!--<class name="net.sf.ohla.rti1516.FederationManagementTestNG"/>--> - <!--</classes>--> - <!--</test>--> + <test name="IEEE 1516 - Federation Management"> + <classes> + <class name="net.sf.ohla.rti1516.FederationManagementTestNG"/> + </classes> + </test> - <!--<test name="IEEE 1516 - Support Services">--> - <!--<classes>--> - <!--<class name="net.sf.ohla.rti1516.SupportServicesTestNG"/>--> - <!--</classes>--> - <!--</test>--> + <test name="IEEE 1516 - Support Services"> + <classes> + <class name="net.sf.ohla.rti1516.SupportServicesTestNG"/> + </classes> + </test> - <!--<test name="IEEE 1516 - Declaration Management">--> - <!--<classes>--> - <!--<class name="net.sf.ohla.rti1516.DeclarationManagementTestNG"/>--> - <!--</classes>--> - <!--</test>--> + <test name="IEEE 1516 - Declaration Management"> + <classes> + <class name="net.sf.ohla.rti1516.DeclarationManagementTestNG"/> + </classes> + </test> - <!--<test name="IEEE 1516 - Object Management">--> - <!--<classes>--> - <!--<class name="net.sf.ohla.rti1516.ObjectManagementTestNG"/>--> - <!--</classes>--> - <!--</test>--> + <test name="IEEE 1516 - Object Management"> + <classes> + <class name="net.sf.ohla.rti1516.ObjectManagementTestNG"/> + </classes> + </test> - <!--<test name="IEEE 1516 - Ownership Management">--> - <!--<classes>--> - <!--<class name="net.sf.ohla.rti1516.OwnershipManagementTestNG"/>--> - <!--</classes>--> - <!--</test>--> + <test name="IEEE 1516 - Ownership Management"> + <classes> + <class name="net.sf.ohla.rti1516.OwnershipManagementTestNG"/> + </classes> + </test> <test name="IEEE 1516 - Time Management"> <classes> @@ -52,9 +52,9 @@ </classes> </test> - <!--<test name="IEEE 1516 - Data Distribution Management">--> - <!--<classes>--> - <!--<class name="net.sf.ohla.rti1516.DataDistributionManagementTestNG"/>--> - <!--</classes>--> - <!--</test>--> + <test name="IEEE 1516 - Data Distribution Management"> + <classes> + <class name="net.sf.ohla.rti1516.DataDistributionManagementTestNG"/> + </classes> + </test> </suite> Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java 2007-02-08 19:24:14 UTC (rev 104) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java 2007-02-09 16:28:42 UTC (rev 105) @@ -70,12 +70,15 @@ import net.sf.ohla.rti1516.messages.callbacks.ReceiveInteraction; import net.sf.ohla.rti1516.messages.callbacks.ReflectAttributeValues; import net.sf.ohla.rti1516.messages.callbacks.RemoveObjectInstance; +import net.sf.ohla.rti1516.messages.callbacks.TimeAdvanceGrant; import org.apache.mina.common.IoSession; import org.apache.mina.common.WriteFuture; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.slf4j.Marker; +import org.slf4j.MarkerFactory; import hla.rti1516.AsynchronousDeliveryAlreadyDisabled; import hla.rti1516.AsynchronousDeliveryAlreadyEnabled; @@ -214,8 +217,6 @@ public class Federate { - private static final Logger log = LoggerFactory.getLogger(Federate.class); - public static final String OHLA_FEDERATE_HOST_PROPERTY = "ohla.federate.%s.host"; public static final String OHLA_FEDERATE_PORT_PROPERTY = @@ -297,6 +298,9 @@ */ protected IoSession rtiSession; + protected final Logger log = LoggerFactory.getLogger(getClass()); + protected final Marker marker; + public Federate(String federateType, String federationExecutionName, FederateAmbassador federateAmbassador, MobileFederateServices mobileFederateServices, @@ -310,6 +314,8 @@ this.mobileFederateServices = mobileFederateServices; this.rtiSession = rtiSession; + marker = MarkerFactory.getMarker(federateType); + JoinFederationExecution joinFederationExecution = new JoinFederationExecution( federateType, federationExecutionName, mobileFederateServices); @@ -340,7 +346,7 @@ LogicalTime galt = joinFederationExecutionResponse.getGALT(); timeManager = new TimeManager(this, mobileFederateServices, galt); - log.info("joined federation execution: {}", federateHandle); + log.info(marker, "joined federation execution: {}", federateHandle); } else if (response instanceof FederationExecutionDoesNotExist) { @@ -425,7 +431,7 @@ futureTasksLock.lock(); try { - log.debug("{} processing future tasks: {}", this, maxFutureTaskTimestamp); + log.debug(marker, "processing future tasks: {}", maxFutureTaskTimestamp); for (TimestampedFutureTask timestampedFutureTask = futureTasks.peek(); timestampedFutureTask != null && @@ -433,14 +439,16 @@ maxFutureTaskTimestamp) <= 0; timestampedFutureTask = futureTasks.peek()) { + log.debug(marker, "processing future task: {}", timestampedFutureTask); + try { timestampedFutureTask.run(); } catch (Throwable t) { - log.error(String.format("unable to execute scheduled task: %s", - timestampedFutureTask), t); + log.error(marker, String.format("unable to execute scheduled task: %s", + timestampedFutureTask), t); } futureTasks.poll(); @@ -454,7 +462,7 @@ public boolean process(IoSession session, Object message) { - log.debug("{} processing: {}", this, message); + log.debug(marker, "processing: {}", message); boolean processed = true; if (message instanceof Callback) @@ -551,13 +559,59 @@ timeManager.getTimeLock().readLock().unlock(); } } + else if (message instanceof RemoveObjectInstance) + { + RemoveObjectInstance removeObjectInstance = + (RemoveObjectInstance) message; + + timeManager.getTimeLock().readLock().lock(); + try + { + OrderType receivedOrderType = + removeObjectInstance.getSentOrderType() == OrderType.TIMESTAMP && + timeManager.isTimeConstrained() ? OrderType.TIMESTAMP : + OrderType.RECEIVE; + + removeObjectInstance.setReceivedOrderType(receivedOrderType); + + if (receivedOrderType == OrderType.RECEIVE) + { + // receive order callbacks need to be held until released if we + // are constrained and in the time granted state, if asynchronous + // delivery is disabled + // + boolean hold = timeManager.isTimeConstrainedAndTimeGranted() && + !isAsynchronousDeliveryEnabled(); + + callbackManager.add(removeObjectInstance, hold); + } + else + { + // schedule the callback for the appropriate time + // + Future future = schedule(removeObjectInstance.getDeleteTime(), + new AddCallback(removeObjectInstance)); + + // register the message retraction handle + // + messageRetractionManager.add( + removeObjectInstance.getDeleteTime(), future, + removeObjectInstance.getMessageRetractionHandle()); + } + } + finally + { + timeManager.getTimeLock().readLock().unlock(); + } + } else { - boolean hold = message instanceof RemoveObjectInstance && - !isAsynchronousDeliveryEnabled() && - timeManager.isTimeConstrainedAndTimeGranted(); + if (message instanceof TimeAdvanceGrant) + { + processFutureTasks(((TimeAdvanceGrant) message).getTime()); + } - callbackManager.add((Callback) message, hold); + callbackManager.add((Callback) message); } } finally @@ -3231,6 +3285,8 @@ protected Future<Object> schedule(LogicalTime time, Callable<Object> callable) { + log.debug(marker, "scheduling task: {} at {}", callable, time); + TimestampedFutureTask future = new TimestampedFutureTask(time, callable); futureTasksLock.lock(); Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java 2007-02-08 19:24:14 UTC (rev 104) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java 2007-02-09 16:28:42 UTC (rev 105) @@ -87,6 +87,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.slf4j.Marker; +import org.slf4j.MarkerFactory; import hla.rti1516.AttributeHandle; import hla.rti1516.AttributeHandleSet; @@ -139,17 +141,15 @@ protected AtomicInteger federateCount = new AtomicInteger(Short.MIN_VALUE); protected AtomicInteger regionCount = new AtomicInteger(Short.MIN_VALUE); - protected final Logger log; + protected final Logger log = LoggerFactory.getLogger(getClass()); + protected final Marker marker; - protected ExecutorService synchronousWaiter = - Executors.newSingleThreadExecutor(); - public FederationExecution(String name, FDD fdd) { this.name = name; this.fdd = fdd; - log = LoggerFactory.getLogger(String.format("%s.%s", getClass(), name)); + marker = MarkerFactory.getMarker(name); } public String getName() @@ -193,7 +193,7 @@ public void joinFederationExecution( IoSession session, JoinFederationExecution joinFederationExecution) { - log.debug("client joining: {}", session.getRemoteAddress()); + log.debug(marker, "client joining: {}", session.getRemoteAddress()); federationExecutionStateLock.readLock().lock(); try @@ -231,7 +231,7 @@ new JoinFederationExecutionResponse( federateHandle, fdd, timeKeeper.getGALT()))); - log.debug("federate joined: {}", federate); + log.debug(marker, "federate joined: {}", federate); // TODO: set timeout // @@ -259,7 +259,7 @@ public void resignFederationExecution( Federate federate, ResignFederationExecution resignFederationExecution) { - log.debug("federate resigning: {} - {}", federate, + log.debug(marker, "federate resigning: {} - {}", federate, resignFederationExecution.getResignAction()); federationExecutionStateLock.readLock().lock(); @@ -272,7 +272,7 @@ federates.remove(federate.getFederateHandle()); - log.debug("federate resigned: {}", federate); + log.debug(marker, "federate resigned: {}", federate); } finally { Modified: trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/TimeAdvanceGrant.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/TimeAdvanceGrant.java 2007-02-08 19:24:14 UTC (rev 104) +++ trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/TimeAdvanceGrant.java 2007-02-09 16:28:42 UTC (rev 105) @@ -32,6 +32,11 @@ this.time = time; } + public LogicalTime getTime() + { + return time; + } + public void execute(FederateAmbassador federateAmbassador) throws InvalidLogicalTime, JoinedFederateIsNotInTimeAdvancingState, FederateInternalError Modified: trunk/testsuite/src/java/net/sf/ohla/rti1516/TimeManagementTestNG.java =================================================================== --- trunk/testsuite/src/java/net/sf/ohla/rti1516/TimeManagementTestNG.java 2007-02-08 19:24:14 UTC (rev 104) +++ trunk/testsuite/src/java/net/sf/ohla/rti1516/TimeManagementTestNG.java 2007-02-09 16:28:42 UTC (rev 105) @@ -76,9 +76,10 @@ protected Integer64Time four = new Integer64Time(4); protected Integer64Time five = new Integer64Time(5); protected Integer64Time six = new Integer64Time(6); - protected Integer64Time seven = new Integer64Time(7); - protected Integer64Time nine = new Integer64Time(9); + protected Integer64Time eight = new Integer64Time(8); protected Integer64Time ten = new Integer64Time(10); + protected Integer64Time eleven = new Integer64Time(11); + protected Integer64Time twelve = new Integer64Time(12); protected Integer64Time fifteen = new Integer64Time(15); protected Integer64Time twenty = new Integer64Time(20); protected Integer64Time thirty = new Integer64Time(30); @@ -628,39 +629,51 @@ federateAmbassadors.get(4).checkAttributeValuesNotReceived( objectInstanceHandle); - // bring all the federates to the same time + // advance constrained federates so they will be sure to receive the + // update (because they will be waiting for the remaining regulating + // federate to advance) // - rtiAmbassadors.get(3).timeAdvanceRequest(five); - rtiAmbassadors.get(4).timeAdvanceRequest(five); + rtiAmbassadors.get(3).timeAdvanceRequest(six); + rtiAmbassadors.get(4).timeAdvanceRequest(six); - federateAmbassadors.get(3).checkTimeAdvanceGrant(five); - federateAmbassadors.get(4).checkTimeAdvanceGrant(five); - // attribute values should have been released // federateAmbassadors.get(3).checkAttributeValues( objectInstanceHandle, attributeValues); federateAmbassadors.get(4).checkAttributeValues( objectInstanceHandle, attributeValues); - } - finally - { - rtiAmbassadors.get(2).deleteObjectInstance(objectInstanceHandle, null); - // bring all the federates to the same time + // finish time advance // rtiAmbassadors.get(2).timeAdvanceRequest(six); - rtiAmbassadors.get(3).timeAdvanceRequest(six); - rtiAmbassadors.get(4).timeAdvanceRequest(six); federateAmbassadors.get(2).checkTimeAdvanceGrant(six); federateAmbassadors.get(3).checkTimeAdvanceGrant(six); federateAmbassadors.get(4).checkTimeAdvanceGrant(six); + } + finally + { + rtiAmbassadors.get(2).deleteObjectInstance(objectInstanceHandle, null); + // advance constrained federates so they will be sure to receive the + // update (because they will be waiting for the remaining regulating + // federate to advance) + // + rtiAmbassadors.get(3).timeAdvanceRequest(eight); + rtiAmbassadors.get(4).timeAdvanceRequest(eight); + federateAmbassadors.get(3).checkForRemovedObjectInstanceHandle( objectInstanceHandle); federateAmbassadors.get(4).checkForRemovedObjectInstanceHandle( objectInstanceHandle); + + // finish time advance + // + rtiAmbassadors.get(2).timeAdvanceRequest(eight); + + federateAmbassadors.get(2).checkTimeAdvanceGrant(eight); + federateAmbassadors.get(3).checkTimeAdvanceGrant(eight); + federateAmbassadors.get(4).checkTimeAdvanceGrant(eight); } } @@ -684,20 +697,25 @@ federateAmbassadors.get(3).checkParameterValuesNotReceived(); federateAmbassadors.get(4).checkParameterValuesNotReceived(); - // bring all the federates to the same time + // advance constrained federates so they will be sure to receive the + // update (because they will be waiting for the remaining regulating + // federate to advance) // - rtiAmbassadors.get(2).timeAdvanceRequest(seven); - rtiAmbassadors.get(3).timeAdvanceRequest(seven); - rtiAmbassadors.get(4).timeAdvanceRequest(seven); + rtiAmbassadors.get(3).timeAdvanceRequest(ten); + rtiAmbassadors.get(4).timeAdvanceRequest(ten); - federateAmbassadors.get(2).checkTimeAdvanceGrant(seven); - federateAmbassadors.get(3).checkTimeAdvanceGrant(seven); - federateAmbassadors.get(4).checkTimeAdvanceGrant(seven); - // parameter values should have been released // federateAmbassadors.get(3).checkParameterValues(parameterValues); federateAmbassadors.get(4).checkParameterValues(parameterValues); + + // finish time advance + // + rtiAmbassadors.get(2).timeAdvanceRequest(ten); + + federateAmbassadors.get(2).checkTimeAdvanceGrant(ten); + federateAmbassadors.get(3).checkTimeAdvanceGrant(ten); + federateAmbassadors.get(4).checkTimeAdvanceGrant(ten); } @Test(dependsOnMethods = {"testSendInteractionWhileNotTimeAdvancing"}) @@ -720,24 +738,23 @@ attributeValues.put(attributeHandle3, ATTRIBUTE3_VALUE.getBytes()); rtiAmbassadors.get(2).updateAttributeValues( - objectInstanceHandle, attributeValues, null, ten); + objectInstanceHandle, attributeValues, null, twelve); - // the 2 constrained federates will not receive it because they do not - // have asynchronous delivery enabled and are not in the time - // advancing state + // the 2 constrained federates will not receive it because they have not + // advanced to the scheduled time // federateAmbassadors.get(3).checkAttributeValuesNotReceived( objectInstanceHandle); federateAmbassadors.get(4).checkAttributeValuesNotReceived( objectInstanceHandle); - rtiAmbassadors.get(2).timeAdvanceRequest(nine); - rtiAmbassadors.get(3).timeAdvanceRequest(nine); - rtiAmbassadors.get(4).timeAdvanceRequest(nine); + rtiAmbassadors.get(2).timeAdvanceRequest(eleven); + rtiAmbassadors.get(3).timeAdvanceRequest(eleven); + rtiAmbassadors.get(4).timeAdvanceRequest(eleven); - federateAmbassadors.get(2).checkTimeAdvanceGrant(nine); - federateAmbassadors.get(3).checkTimeAdvanceGrant(nine); - federateAmbassadors.get(4).checkTimeAdvanceGrant(nine); + federateAmbassadors.get(2).checkTimeAdvanceGrant(eleven); + federateAmbassadors.get(3).checkTimeAdvanceGrant(eleven); + federateAmbassadors.get(4).checkTimeAdvanceGrant(eleven); // the 2 constrained federates will not receive it because they have not // advanced to the scheduled time @@ -749,13 +766,13 @@ // bring all the federates to the same time // - rtiAmbassadors.get(2).timeAdvanceRequest(ten); - rtiAmbassadors.get(3).timeAdvanceRequest(ten); - rtiAmbassadors.get(4).timeAdvanceRequest(ten); + rtiAmbassadors.get(2).timeAdvanceRequest(twelve); + rtiAmbassadors.get(3).timeAdvanceRequest(twelve); + rtiAmbassadors.get(4).timeAdvanceRequest(twelve); - federateAmbassadors.get(2).checkTimeAdvanceGrant(ten); - federateAmbassadors.get(3).checkTimeAdvanceGrant(ten); - federateAmbassadors.get(4).checkTimeAdvanceGrant(ten); + federateAmbassadors.get(2).checkTimeAdvanceGrant(twelve); + federateAmbassadors.get(3).checkTimeAdvanceGrant(twelve); + federateAmbassadors.get(4).checkTimeAdvanceGrant(twelve); // attribute values should have been released // @@ -768,20 +785,25 @@ { rtiAmbassadors.get(2).deleteObjectInstance(objectInstanceHandle, null); - // bring all the federates to the same time + // advance constrained federates so they will be sure to receive the + // update (because they will be waiting for the remaining regulating + // federate to advance) // - rtiAmbassadors.get(2).timeAdvanceRequest(fifteen); rtiAmbassadors.get(3).timeAdvanceRequest(fifteen); rtiAmbassadors.get(4).timeAdvanceRequest(fifteen); - federateAmbassadors.get(2).checkTimeAdvanceGrant(fifteen); - federateAmbassadors.get(3).checkTimeAdvanceGrant(fifteen); - federateAmbassadors.get(4).checkTimeAdvanceGrant(fifteen); - federateAmbassadors.get(3).checkForRemovedObjectInstanceHandle( objectInstanceHandle); federateAmbassadors.get(4).checkForRemovedObjectInstanceHandle( objectInstanceHandle); + + // finish time advance + // + rtiAmbassadors.get(2).timeAdvanceRequest(fifteen); + + federateAmbassadors.get(2).checkTimeAdvanceGrant(fifteen); + federateAmbassadors.get(3).checkTimeAdvanceGrant(fifteen); + federateAmbassadors.get(4).checkTimeAdvanceGrant(fifteen); } } @@ -1062,6 +1084,17 @@ } @Override + public void removeObjectInstance(ObjectInstanceHandle objectInstanceHandle, + byte[] tag, OrderType sentOrderType, + LogicalTime deleteTime, + OrderType receivedOrderType, + MessageRetractionHandle messageRetractionHandle) + throws ObjectInstanceNotKnown, InvalidLogicalTime, FederateInternalError + { + objectInstances.get(objectInstanceHandle).setRemoved(true); + } + + @Override public void receiveInteraction( InteractionClassHandle interactionClassHandle, ParameterHandleValueMap parameterValues, @@ -1123,134 +1156,4 @@ this.removed = removed; } } -// public void test() -// { -// TimeClient tc = new TimeClient("A", new Integer64TimeInterval(3000), false); -// TimeClient tc2 = new TimeClient("B", new Integer64TimeInterval(5000), true); -//// TimeClient tc3 = new TimeClient(35000); -// -// tc.timeAdvanceGrant(time); -// tc2.timeAdvanceGrant(time); -// -// tc.start(); -// tc2.start(); -//// tc3.start(); -// -// new Thread() -// { -// public void run() -// { -// int i = 0; -// while (true) -// { -// log.debug(String.format("[%d] %s", i++, time)); -// try -// { -// Thread.sleep(1000); -// } -// catch (InterruptedException e) -// { -// e.printStackTrace(); -// } -// } -// } -// }.start(); -// } -// -// protected class TimeClient -// extends Thread -// { -// protected Logger log; -// -// protected String name; -// protected Integer6... [truncated message content] |
From: <mne...@us...> - 2007-02-08 19:24:14
|
Revision: 104 http://svn.sourceforge.net/ohla/?rev=104&view=rev Author: mnewcomb Date: 2007-02-08 11:24:14 -0800 (Thu, 08 Feb 2007) Log Message: ----------- - all but 1 time management test passes Modified Paths: -------------- trunk/build/build.xml trunk/build/intellij/HLA 1.3.iml trunk/build/intellij/IEEE 1516.iml trunk/build/intellij/OHLA.iml trunk/build/intellij/OHLA.ipr trunk/build/intellij/OHLA.iws trunk/build/intellij/RTI.iml trunk/build/intellij/Testsuite.iml trunk/resources/testsuite/ieee-1516-testng.xml trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java trunk/rti/src/java/net/sf/ohla/rti1516/federate/time/TimeManager.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/Federate.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/time/TimeKeeper.java trunk/testsuite/src/java/net/sf/ohla/rti1516/FederationManagementTestNG.java trunk/testsuite/src/java/net/sf/ohla/rti1516/ObjectManagementTestNG.java trunk/testsuite/src/java/net/sf/ohla/rti1516/OwnershipManagementTestNG.java trunk/testsuite/src/java/net/sf/ohla/rti1516/TimeManagementTestNG.java Added Paths: ----------- trunk/resources/logback-test.xml trunk/thirdparty/logback/ trunk/thirdparty/logback/LICENSE.txt trunk/thirdparty/logback/lib/ trunk/thirdparty/logback/lib/logback-classic-0.9.jar trunk/thirdparty/logback/lib/logback-core-0.9.jar Removed Paths: ------------- trunk/resources/properties/log4j.properties trunk/rti/src/java/net/sf/ohla/rti1516/federation/time/TimeConstrainedFederate.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/time/TimeRegulatingFederate.java Modified: trunk/build/build.xml =================================================================== --- trunk/build/build.xml 2007-02-08 15:41:53 UTC (rev 103) +++ trunk/build/build.xml 2007-02-08 19:24:14 UTC (rev 104) @@ -41,14 +41,6 @@ <!-- Libraries --> <!-- ================================================================ --> - <!-- Log4J --> - <property name="apache.log4j.root" - location="${project.thirdparty}/apache/log4j"/> - <property name="apache.log4j.lib" location="${apache.log4j.root}/lib"/> - <path id="apache.log4j.classpath"> - <fileset dir="${apache.log4j.lib}" includes="*.jar"/> - </path> - <!-- MINA --> <property name="apache.mina.root" location="${project.thirdparty}/apache/mina"/> @@ -68,9 +60,16 @@ <property name="slf4j.root" location="${project.thirdparty}/slf4j"/> <property name="slf4j.lib" location="${slf4j.root}/lib"/> <path id="slf4j.classpath"> - <pathelement location="${slf4j.lib}/slf4j-log4j12.jar"/> + <fileset dir="${slf4j.lib}" includes="*.jar"/> </path> + <!-- Logback --> + <property name="logback.root" location="${project.thirdparty}/logback"/> + <property name="logback.lib" location="${logback.root}/lib"/> + <path id="logback.classpath"> + <fileset dir="${logback.lib}" includes="*.jar"/> + </path> + <!-- JavaCC --> <property name="javacc.root" location="${project.thirdparty}/javacc"/> <property name="javacc.bin" location="${javacc.root}/bin"/> @@ -85,9 +84,9 @@ <!-- The combined library classpath. --> <path id="library.classpath"> - <path refid="apache.log4j.classpath"/> <path refid="apache.mina.classpath"/> <path refid="slf4j.classpath"/> + <path refid="logback.classpath"/> <path refid="dom4j.classpath"/> </path> @@ -113,11 +112,7 @@ <!-- Initialization --> <!-- ================================================================== --> - <target name="init" depends=""> - <!-- The build id (when was this thing built). --> - <tstamp> - <format property="build.id" pattern="yyyyMMddHHmm"/> - </tstamp> + <target name="init"> </target> @@ -320,7 +315,7 @@ <pathelement location="${output.lib}/${ieee-1516.jar}"/> <pathelement location="${output.lib}/${rti.jar}"/> <pathelement location="${output}/testsuite/classes"/> - <pathelement location="${project.resources.properties}"/> + <pathelement location="${project.resources}"/> <pathelement location="${project.resources.testsuite}"/> </classpath> <xmlfileset dir="${project.resources.testsuite}" includes="ieee-1516-testng.xml"/> @@ -353,7 +348,7 @@ <pathelement location="${output.lib}/${ieee-1516.jar}"/> <pathelement location="${output.lib}/${rti.jar}"/> <pathelement location="${output}/testsuite/classes"/> - <pathelement location="${project.resources.properties}"/> + <pathelement location="${project.resources}"/> <pathelement location="${project.resources.testsuite}"/> </classpath> <xmlfileset dir="${project.resources.testsuite}" @@ -411,7 +406,7 @@ <pathelement location="${output.lib}/${ieee-1516.jar}"/> <pathelement location="${output.lib}/${hla-1.3.jar}"/> <pathelement location="${output.lib}/${rti.jar}"/> - <pathelement location="${project.resources.properties}"/> + <pathelement location="${project.resources}"/> </classpath> <jvmarg value="-server"/> @@ -425,8 +420,7 @@ <!-- Cleaning --> <!-- ================================================================== --> - <target name="clean-light" depends="" - description="Cleans any editor backup files."> + <target name="clean-light" description="Cleans any editor backup files."> <delete> <fileset dir="${project.root}" includes="**/*~" defaultexcludes="no"/> </delete> Modified: trunk/build/intellij/HLA 1.3.iml =================================================================== --- trunk/build/intellij/HLA 1.3.iml 2007-02-08 15:41:53 UTC (rev 103) +++ trunk/build/intellij/HLA 1.3.iml 2007-02-08 19:24:14 UTC (rev 104) @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <module version="4" relativePaths="true" type="JAVA_MODULE"> <component name="ModuleRootManager" /> - <component name="NewModuleRootManager"> + <component name="NewModuleRootManager" inherit-compiler-output="false"> <output url="file://$MODULE_DIR$/../output/hla-1.3/classes" /> <exclude-output /> <content url="file://$MODULE_DIR$/../../hla-1.3"> @@ -9,6 +9,8 @@ </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="library" name="logback" level="project" /> + <orderEntry type="library" name="slf4j" level="project" /> <orderEntryProperties /> </component> <component name="copyright"> Modified: trunk/build/intellij/IEEE 1516.iml =================================================================== --- trunk/build/intellij/IEEE 1516.iml 2007-02-08 15:41:53 UTC (rev 103) +++ trunk/build/intellij/IEEE 1516.iml 2007-02-08 19:24:14 UTC (rev 104) @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <module version="4" relativePaths="true" type="JAVA_MODULE"> <component name="ModuleRootManager" /> - <component name="NewModuleRootManager"> + <component name="NewModuleRootManager" inherit-compiler-output="false"> <output url="file://$MODULE_DIR$/../output/ieee-1516/classes" /> <exclude-output /> <content url="file://$MODULE_DIR$/../../ieee-1516"> Modified: trunk/build/intellij/OHLA.iml =================================================================== --- trunk/build/intellij/OHLA.iml 2007-02-08 15:41:53 UTC (rev 103) +++ trunk/build/intellij/OHLA.iml 2007-02-08 19:24:14 UTC (rev 104) @@ -1,22 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <module version="4" relativePaths="true" type="JAVA_MODULE"> <component name="ModuleRootManager" /> - <component name="NewModuleRootManager"> + <component name="NewModuleRootManager" inherit-compiler-output="false"> <exclude-output /> <content url="file://$MODULE_DIR$/../.."> <excludeFolder url="file://$MODULE_DIR$/../output" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module-library"> - <library> - <CLASSES> - <root url="file://$MODULE_DIR$/../../resources/properties" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> - </orderEntry> <orderEntryProperties /> </component> <component name="copyright"> Modified: trunk/build/intellij/OHLA.ipr =================================================================== --- trunk/build/intellij/OHLA.ipr 2007-02-08 15:41:53 UTC (rev 103) +++ trunk/build/intellij/OHLA.ipr 2007-02-08 19:24:14 UTC (rev 104) @@ -96,7 +96,6 @@ </component> <component name="CompilerConfiguration"> <option name="DEFAULT_COMPILER" value="Javac" /> - <option name="CLEAR_OUTPUT_DIRECTORY" value="false" /> <option name="DEPLOY_AFTER_MAKE" value="0" /> <resourceExtensions> <entry name=".+\.(properties|xml|html|dtd|tld)" /> @@ -202,6 +201,7 @@ <option name="OPTION_DEPRECATED_LIST" value="true" /> <option name="OTHER_OPTIONS" value="" /> <option name="HEAP_SIZE" /> + <option name="LOCALE" /> <option name="OPEN_IN_BROWSER" value="true" /> </component> <component name="JikesSettings"> @@ -220,121 +220,121 @@ </component> <component name="Palette2"> <group name="Swing"> - <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false"> + <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false"> <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" /> </item> - <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false"> + <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false"> <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" /> </item> - <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false"> + <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false"> <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" /> </item> - <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false"> + <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true"> <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" /> </item> - <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false"> + <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false"> <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" /> <initial-values> <property name="text" value="Button" /> </initial-values> </item> - <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false"> + <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false"> <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> <initial-values> <property name="text" value="RadioButton" /> </initial-values> </item> - <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false"> + <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false"> <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> <initial-values> <property name="text" value="CheckBox" /> </initial-values> </item> - <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false"> + <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false"> <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" /> <initial-values> <property name="text" value="Label" /> </initial-values> </item> - <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false"> + <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true"> <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> <preferred-size width="150" height="-1" /> </default-constraints> </item> - <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false"> + <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true"> <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> <preferred-size width="150" height="-1" /> </default-constraints> </item> - <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false"> + <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true"> <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> <preferred-size width="150" height="-1" /> </default-constraints> </item> - <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false"> + <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true"> <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> <preferred-size width="150" height="50" /> </default-constraints> </item> - <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false"> + <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true"> <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> <preferred-size width="150" height="50" /> </default-constraints> </item> - <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false"> + <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true"> <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> <preferred-size width="150" height="50" /> </default-constraints> </item> - <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false"> + <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true"> <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" /> </item> - <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false"> + <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false"> <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> <preferred-size width="150" height="50" /> </default-constraints> </item> - <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false"> + <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false"> <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3"> <preferred-size width="150" height="50" /> </default-constraints> </item> - <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false"> + <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false"> <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> <preferred-size width="150" height="50" /> </default-constraints> </item> - <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false"> + <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false"> <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> <preferred-size width="200" height="200" /> </default-constraints> </item> - <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false"> + <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false"> <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> <preferred-size width="200" height="200" /> </default-constraints> </item> - <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false"> + <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true"> <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> </item> - <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false"> + <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false"> <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> </item> - <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false"> + <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false"> <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" /> </item> - <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false"> + <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false"> <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" /> </item> - <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false"> + <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false"> <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1"> <preferred-size width="-1" height="20" /> </default-constraints> </item> - <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false"> + <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false"> <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" /> </item> - <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false"> + <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false"> <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" /> </item> </group> @@ -348,7 +348,7 @@ <module fileurl="file://$PROJECT_DIR$/Testsuite.iml" filepath="$PROJECT_DIR$/Testsuite.iml" /> </modules> </component> - <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="1.5" /> + <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK" /> <component name="ProjectRunConfigurationManager" /> <component name="RmicSettings"> <option name="IS_EANABLED" value="false" /> @@ -394,7 +394,7 @@ <option name="filler" value=" " /> </value> </option> - <option name="notice" value="Copyright (c) &#36;today.year, Michael Newcomb Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License." /> + <option name="notice" value="Copyright (c) 2006-2007, Michael Newcomb Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License." /> <option name="keyword" value="Copyright" /> <option name="fileTypeOverride" value="4" /> <option name="relativeBefore" value="true" /> @@ -576,31 +576,26 @@ <root url="file://$PROJECT_DIR$/../../../mina-1.1/core/src/main/java" /> </SOURCES> </library> - <library name="slf4j-log4j12"> + <library name="logback"> <CLASSES> - <root url="jar://$PROJECT_DIR$/../../thirdparty/slf4j/lib/slf4j-log4j12.jar!/" /> + <root url="jar://$PROJECT_DIR$/../../thirdparty/logback/lib/logback-classic-0.9.jar!/" /> + <root url="jar://$PROJECT_DIR$/../../thirdparty/logback/lib/logback-core-0.9.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> </library> - <library name="slf4j-nop"> + <library name="slf4j"> <CLASSES> - <root url="jar://$PROJECT_DIR$/../../thirdparty/slf4j/lib/slf4j-nop.jar!/" /> + <root url="jar://$PROJECT_DIR$/../../thirdparty/slf4j/lib/slf4j-api-1.2.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> </library> - <library name="log4j-1.2.14"> - <CLASSES> - <root url="jar://$PROJECT_DIR$/../../thirdparty/apache/log4j/lib/log4j-1.2.14.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> </component> <component name="uidesigner-configuration"> <option name="INSTRUMENT_CLASSES" value="true" /> <option name="COPY_FORMS_RUNTIME_TO_OUTPUT" value="true" /> + <option name="DEFAULT_LAYOUT_MANAGER" value="GridLayoutManager" /> </component> <UsedPathMacros /> </project> Modified: trunk/build/intellij/OHLA.iws =================================================================== --- trunk/build/intellij/OHLA.iws 2007-02-08 15:41:53 UTC (rev 103) +++ trunk/build/intellij/OHLA.iws 2007-02-08 19:24:14 UTC (rev 104) @@ -1,7 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <project version="4" relativePaths="true"> <component name="AspectsView" /> - <component name="BookmarkManager" /> + <component name="BookmarkManager"> + <editor_bookmark url="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/objects/ObjectInstance.java" line="211" /> + </component> <component name="ChangeBrowserSettings"> <option name="MAIN_SPLITTER_PROPORTION" value="0.3" /> <option name="MESSAGES_SPLITTER_PROPORTION" value="0.8" /> @@ -17,7 +19,35 @@ <option name="USER" value="" /> </component> <component name="ChangeListManager"> - <list default="true" name="Default" comment="" /> + <list default="true" name="Default" comment=""> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/ObjectManagementTestNG.java" afterPath="$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/ObjectManagementTestNG.java" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/OHLA.iml" afterPath="$PROJECT_DIR$/OHLA.iml" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/Federate.java" afterPath="$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/Federate.java" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/time/TimeKeeper.java" afterPath="$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/time/TimeKeeper.java" /> + <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/../../thirdparty/logback/LICENSE.txt" /> + <change type="DELETED" beforePath="D:\projects\ohla-0.4\resources\properties\log4j.properties" afterPath="" /> + <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/../../resources/logback-test.xml" /> + <change type="DELETED" beforePath="D:\projects\ohla-0.4\rti\src\java\net\sf\ohla\rti1516\federation\time\TimeConstrainedFederate.java" afterPath="" /> + <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/../../thirdparty/logback/lib/logback-core-0.9.jar" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/RTI.iml" afterPath="$PROJECT_DIR$/RTI.iml" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/IEEE 1516.iml" afterPath="$PROJECT_DIR$/IEEE 1516.iml" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../build.xml" afterPath="$PROJECT_DIR$/../build.xml" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/OHLA.iws" afterPath="$PROJECT_DIR$/OHLA.iws" /> + <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/../../thirdparty/logback" /> + <change type="DELETED" beforePath="D:\projects\ohla-0.4\rti\src\java\net\sf\ohla\rti1516\federation\time\TimeRegulatingFederate.java" afterPath="" /> + <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/../../thirdparty/logback/lib/logback-classic-0.9.jar" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/Federate.java" afterPath="$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/Federate.java" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/time/TimeManager.java" afterPath="$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/time/TimeManager.java" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../resources/testsuite/ieee-1516-testng.xml" afterPath="$PROJECT_DIR$/../../resources/testsuite/ieee-1516-testng.xml" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/OHLA.ipr" afterPath="$PROJECT_DIR$/OHLA.ipr" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/OwnershipManagementTestNG.java" afterPath="$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/OwnershipManagementTestNG.java" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/FederationManagementTestNG.java" afterPath="$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/FederationManagementTestNG.java" /> + <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/../../thirdparty/logback/lib" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/HLA 1.3.iml" afterPath="$PROJECT_DIR$/HLA 1.3.iml" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/TimeManagementTestNG.java" afterPath="$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/TimeManagementTestNG.java" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Testsuite.iml" afterPath="$PROJECT_DIR$/Testsuite.iml" /> + </list> + <list name="Failed commit: Default" comment="- removed log4j" /> </component> <component name="ChangeListSynchronizer" /> <component name="ChangesViewManager" flattened_view="true" /> @@ -32,6 +62,8 @@ <option name="AUTO_SHOW_ERRORS_IN_EDITOR" value="true" /> <option name="CLOSE_MESSAGE_VIEW_IF_SUCCESS" value="true" /> <option name="COMPILE_DEPENDENT_FILES" value="false" /> + <option name="CLEAR_OUTPUT_DIRECTORY" value="false" /> + <option name="ASSERT_NOT_NULL" value="true" /> </component> <component name="CoverageDataManager" /> <component name="Cvs2Configuration"> @@ -85,6 +117,47 @@ <disable_hints /> </component> <component name="DebuggerManager"> + <line_breakpoints> + <breakpoint url="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/objects/ObjectInstance.java" line="102" class="net.sf.ohla.rti1516.federation.objects.ObjectInstance" package="net.sf.ohla.rti1516.federation.objects"> + <option name="ENABLED" value="true" /> + <option name="SUSPEND_POLICY" value="SuspendAll" /> + <option name="LOG_ENABLED" value="false" /> + <option name="LOG_EXPRESSION_ENABLED" value="false" /> + <option name="COUNT_FILTER_ENABLED" value="false" /> + <option name="COUNT_FILTER" value="0" /> + <option name="CONDITION_ENABLED" value="false" /> + <option name="CLASS_FILTERS_ENABLED" value="false" /> + <option name="INSTANCE_FILTERS_ENABLED" value="false" /> + <option name="CONDITION" value="" /> + <option name="LOG_MESSAGE" value="" /> + </breakpoint> + <breakpoint url="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/objects/AttributeInstance.java" line="141" class="net.sf.ohla.rti1516.federation.objects.AttributeInstance" package="net.sf.ohla.rti1516.federation.objects"> + <option name="ENABLED" value="true" /> + <option name="SUSPEND_POLICY" value="SuspendAll" /> + <option name="LOG_ENABLED" value="false" /> + <option name="LOG_EXPRESSION_ENABLED" value="false" /> + <option name="COUNT_FILTER_ENABLED" value="false" /> + <option name="COUNT_FILTER" value="0" /> + <option name="CONDITION_ENABLED" value="false" /> + <option name="CLASS_FILTERS_ENABLED" value="false" /> + <option name="INSTANCE_FILTERS_ENABLED" value="false" /> + <option name="CONDITION" value="" /> + <option name="LOG_MESSAGE" value="" /> + </breakpoint> + <breakpoint url="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/objects/ObjectInstance.java" line="211" class="net.sf.ohla.rti1516.federation.objects.ObjectInstance" package="net.sf.ohla.rti1516.federation.objects"> + <option name="ENABLED" value="true" /> + <option name="SUSPEND_POLICY" value="SuspendAll" /> + <option name="LOG_ENABLED" value="false" /> + <option name="LOG_EXPRESSION_ENABLED" value="false" /> + <option name="COUNT_FILTER_ENABLED" value="false" /> + <option name="COUNT_FILTER" value="0" /> + <option name="CONDITION_ENABLED" value="false" /> + <option name="CLASS_FILTERS_ENABLED" value="false" /> + <option name="INSTANCE_FILTERS_ENABLED" value="false" /> + <option name="CONDITION" value="" /> + <option name="LOG_MESSAGE" value="" /> + </breakpoint> + </line_breakpoints> <breakpoint_any> <breakpoint> <option name="NOTIFY_CAUGHT" value="true" /> @@ -169,56 +242,87 @@ </component> <component name="FileEditorManager"> <leaf> - <file leaf-file-name="FederationExecution.java" pinned="false" current="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java"> + <file leaf-file-name="ObjectManagementTestNG.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/ObjectManagementTestNG.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="403" column="0" selection-start="14488" selection-end="14488" vertical-scroll-proportion="0.021197008"> + <state line="481" column="39" selection-start="17964" selection-end="17964" vertical-scroll-proportion="0.021573603"> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="ObjectInstance.java" pinned="false" current="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/objects/ObjectInstance.java"> + <file leaf-file-name="OwnershipManagementTestNG.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/OwnershipManagementTestNG.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="47" column="13" selection-start="1932" selection-end="1932" vertical-scroll-proportion="0.021197008"> - <folding> - <element signature="imports" expanded="true" /> - <marker date="1166728743453" expanded="true" signature="13916:13936" placeholder="{...}" /> - </folding> + <state line="550" column="0" selection-start="19642" selection-end="19642" vertical-scroll-proportion="0.021573603"> + <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="ObjectManager.java" pinned="false" current="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/objects/ObjectManager.java"> + <file leaf-file-name="SupportServicesTestNG.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/SupportServicesTestNG.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="74" column="14" selection-start="2434" selection-end="2434" vertical-scroll-proportion="0.70746636"> - <folding> - <marker date="1166728740359" expanded="true" signature="2068:2178" placeholder="{...}" /> - </folding> + <state line="43" column="13" selection-start="1566" selection-end="1566" vertical-scroll-proportion="0.021573603"> + <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="AttributeInstance.java" pinned="false" current="true" current-in-tab="true"> - <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/objects/AttributeInstance.java"> + <file leaf-file-name="Federate.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/Federate.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="18" column="0" selection-start="655" selection-end="655" vertical-scroll-proportion="0.08323134"> + <state line="338" column="38" selection-start="9390" selection-end="9390" vertical-scroll-proportion="0.021573603"> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="AttributeInstance.java" pinned="false" current="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/objects/AttributeInstance.java"> + <file leaf-file-name="ieee-1516-testng.xml" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/../../resources/testsuite/ieee-1516-testng.xml"> <provider selected="true" editor-type-id="text-editor"> - <state line="30" column="13" selection-start="1035" selection-end="1035" vertical-scroll-proportion="0.124847"> + <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0"> <folding /> </state> </provider> </entry> </file> + <file leaf-file-name="TestObjectModel.xml" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/../../resources/testsuite/TestObjectModel.xml"> + <provider selected="true" editor-type-id="text-editor"> + <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0"> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="TimeManagementTestNG.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/TimeManagementTestNG.java"> + <provider selected="true" editor-type-id="text-editor"> + <state line="626" column="13" selection-start="23219" selection-end="23219" vertical-scroll-proportion="0.021573603"> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="logback-test.xml" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/../../resources/logback-test.xml"> + <provider selected="true" editor-type-id="text-editor"> + <state line="20" column="54" selection-start="839" selection-end="839" vertical-scroll-proportion="0.4314721"> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="build.xml" pinned="false" current="true" current-in-tab="true"> + <entry file="file://$PROJECT_DIR$/../build.xml"> + <provider selected="true" editor-type-id="text-editor"> + <state line="44" column="0" selection-start="1897" selection-end="1897" vertical-scroll-proportion="0.35406092"> + <folding /> + </state> + </provider> + </entry> + </file> </leaf> </component> <component name="FindManager"> @@ -235,20 +339,15 @@ <option name="AUTOSCROLL_TO_SOURCE" value="false" /> <option name="SPLITTER_PROPORTION" value="0.5" /> <option name="GROUP_BY_SEVERITY" value="false" /> + <option name="FILTER_RESOLVED_ITEMS" value="true" /> <option name="ANALYZE_TEST_SOURCES" value="true" /> + <option name="SHOW_DIFF_WITH_PREVIOUS_RUN" value="false" /> <option name="SCOPE_TYPE" value="3" /> <option name="CUSTOM_SCOPE_NAME" value="Project Files" /> - <profile name="Default" /> + <option name="SHOW_ONLY_DIFF" value="false" /> + <option name="myCurrentProfileName" value="Default" /> </component> - <component name="J2EEProjectPane"> - <PATH> - <PATH_ELEMENT> - <option name="myItemId" value="OHLA.ipr" /> - <option name="myItemType" value="com.intellij.j2ee.module.view.nodes.J2EEProjectNodeDescriptor" /> - </PATH_ELEMENT> - </PATH> - <setting name="SHOW_AS_DEPLOYMENT_VIEW" value="false" /> - </component> + <component name="J2EEProjectPane" /> <component name="JspContextManager" /> <component name="ModuleEditorState"> <option name="LAST_EDITED_MODULE_NAME" value="OHLA" /> @@ -256,36 +355,14 @@ </component> <component name="NamedScopeManager" /> <component name="PackagesPane"> - <PATH> - <PATH_ELEMENT> - <option name="myItemId" value="OHLA.ipr" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" /> - </PATH_ELEMENT> - </PATH> - <PATH> - <PATH_ELEMENT> - <option name="myItemId" value="OHLA.ipr" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="RTI" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" /> - </PATH_ELEMENT> - </PATH> - <PATH> - <PATH_ELEMENT> - <option name="myItemId" value="OHLA.ipr" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="RTI" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="hla.rti1516.jlc.omt" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" /> - </PATH_ELEMENT> - </PATH> + <subPane> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="OHLA.ipr" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" /> + </PATH_ELEMENT> + </PATH> + </subPane> </component> <component name="PerforceChangeBrowserSettings"> <option name="USE_CLIENT_FILTER" value="true" /> @@ -309,13 +386,9 @@ <option name="ENABLED" value="true" /> <option name="USE_LOGIN" value="false" /> <option name="LOGIN_SILENTLY" value="false" /> - <option name="INTEGRATE_BRANCH_NAME" /> - <option name="INTEGRATE_CHANGELIST_NUM" value="-1" /> <option name="INTEGRATE_RUN_RESOLVE" value="true" /> <option name="INTEGRATE_REVERT_UNCHANGED" value="true" /> - <option name="INTEGRATE_CHANGE_LIST_NUMBER" value="" /> - <option name="INTEGRATE_CHANGE_LIST" value="false" /> - <option name="INTEGRATE_REVERSE" value="false" /> + <option name="SERVER_TIMEOUT" value="20000" /> </component> <component name="ProjectLevelVcsManager"> <OptionsSetting value="true" id="Add" /> @@ -332,257 +405,451 @@ <ConfirmationsSetting value="0" id="Remove" /> </component> <component name="ProjectPane"> - <PATH> - <PATH_ELEMENT> - <option name="myItemId" value="OHLA.ipr" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> - </PATH_ELEMENT> - </PATH> - <PATH> - <PATH_ELEMENT> - <option name="myItemId" value="OHLA.ipr" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="RTI" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> - </PATH_ELEMENT> - </PATH> - <PATH> - <PATH_ELEMENT> - <option name="myItemId" value="OHLA.ipr" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="RTI" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - </PATH> - <PATH> - <PATH_ELEMENT> - <option name="myItemId" value="OHLA.ipr" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="RTI" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516\federation" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - </PATH> - <PATH> - <PATH_ELEMENT> - <option name="myItemId" value="OHLA.ipr" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="RTI" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516\federation" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516\federation\objects" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - </PATH> - <PATH> - <PATH_ELEMENT> - <option name="myItemId" value="OHLA.ipr" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="RTI" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516\federate" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - </PATH> - <PATH> - <PATH_ELEMENT> - <option name="myItemId" value="OHLA.ipr" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="RTI" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516\federate" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516\federate\objects" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - </PATH> - <PATH> - <PATH_ELEMENT> - <option name="myItemId" value="OHLA.ipr" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="RTI" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - </PATH> - <PATH> - <PATH_ELEMENT> - <option name="myItemId" value="OHLA.ipr" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="RTI" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java" /> - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> - </PATH_ELEMENT> - </PATH> + <subPane> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="OHLA.ipr" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="Testsuite" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="OHLA.ipr" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="Testsuite" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4\testsuite" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4\testsuite\src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4\testsuite\src\java" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4\testsuite\src\java\net\sf\ohla" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4\testsuite\src\java\net\sf\ohla\rti1516" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="OHLA.ipr" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="Testsuite" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4\testsuite" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4\testsuite\src" /> + <option name="myItemType" value="com.intell... [truncated message content] |
From: <mne...@us...> - 2007-02-08 15:42:05
|
Revision: 103 http://svn.sourceforge.net/ohla/?rev=103&view=rev Author: mnewcomb Date: 2007-02-08 07:41:53 -0800 (Thu, 08 Feb 2007) Log Message: ----------- - migrated to logback Added Paths: ----------- trunk/thirdparty/slf4j/lib/slf4j-api-1.2.jar Removed Paths: ------------- trunk/thirdparty/slf4j/lib/slf4j-log4j12.jar trunk/thirdparty/slf4j/lib/slf4j-nop.jar Added: trunk/thirdparty/slf4j/lib/slf4j-api-1.2.jar =================================================================== (Binary files differ) Property changes on: trunk/thirdparty/slf4j/lib/slf4j-api-1.2.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: trunk/thirdparty/slf4j/lib/slf4j-log4j12.jar =================================================================== (Binary files differ) Deleted: trunk/thirdparty/slf4j/lib/slf4j-nop.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mne...@us...> - 2007-02-08 15:41:24
|
Revision: 102 http://svn.sourceforge.net/ohla/?rev=102&view=rev Author: mnewcomb Date: 2007-02-08 07:41:17 -0800 (Thu, 08 Feb 2007) Log Message: ----------- - removed log4j Removed Paths: ------------- trunk/thirdparty/apache/log4j/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mne...@us...> - 2007-02-01 03:31:25
|
Revision: 101 http://svn.sourceforge.net/ohla/?rev=101&view=rev Author: mnewcomb Date: 2007-01-31 19:31:24 -0800 (Wed, 31 Jan 2007) Log Message: ----------- - removed uncessary delay Modified Paths: -------------- trunk/testsuite/src/java/net/sf/ohla/rti1516/ObjectManagementTestNG.java Modified: trunk/testsuite/src/java/net/sf/ohla/rti1516/ObjectManagementTestNG.java =================================================================== --- trunk/testsuite/src/java/net/sf/ohla/rti1516/ObjectManagementTestNG.java 2007-02-01 03:28:39 UTC (rev 100) +++ trunk/testsuite/src/java/net/sf/ohla/rti1516/ObjectManagementTestNG.java 2007-02-01 03:31:24 UTC (rev 101) @@ -324,12 +324,6 @@ attributeValues.put(attributeHandle2, ATTRIBUTE2_VALUE.getBytes()); attributeValues.put(attributeHandle3, ATTRIBUTE3_VALUE.getBytes()); - // because of the nature of distributed computing, the subscribe message - // from federate #3 may not have arrived at federate #1 or #2, so we need - // to put in an artificual pause because we want the testing to succeed - // - rtiAmbassadors.get(0).evokeCallback(1.0); - rtiAmbassadors.get(0).updateAttributeValues( objectInstanceHandle, attributeValues, null); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mne...@us...> - 2007-02-01 03:28:48
|
Revision: 100 http://svn.sourceforge.net/ohla/?rev=100&view=rev Author: mnewcomb Date: 2007-01-31 19:28:39 -0800 (Wed, 31 Jan 2007) Log Message: ----------- - Federation Management, Support Services, Declaration Management, and Object Management unit test cases passing Modified Paths: -------------- trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/Federate.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederateIoFilter.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/objects/ObjectManager.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/time/TimeKeeper.java Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java 2007-02-01 03:25:00 UTC (rev 99) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java 2007-02-01 03:28:39 UTC (rev 100) @@ -452,6 +452,8 @@ public boolean process(IoSession session, Object message) { + log.debug("{} processing: {}", federateHandle, message); + boolean processed = true; if (message instanceof Callback) { Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federation/Federate.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federation/Federate.java 2007-02-01 03:25:00 UTC (rev 99) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/Federate.java 2007-02-01 03:28:39 UTC (rev 100) @@ -33,8 +33,10 @@ import net.sf.ohla.rti1516.messages.FederateRestoreNotComplete; import net.sf.ohla.rti1516.messages.RequestAttributeValueUpdate; import net.sf.ohla.rti1516.messages.Retract; +import net.sf.ohla.rti1516.messages.GALTAdvanced; import org.apache.mina.common.IoSession; +import org.apache.mina.common.WriteFuture; import hla.rti1516.FederateHandle; import hla.rti1516.RestoreStatus; @@ -94,17 +96,18 @@ session.getFilterChain().remove(FEDERATE_IO_FILTER); } - public void announceSynchronizationPoint( + public WriteFuture announceSynchronizationPoint( AnnounceSynchronizationPoint announceSynchronizationPoint) { - session.write(announceSynchronizationPoint); + return session.write(announceSynchronizationPoint); } - public void initiateFederateSave(InitiateFederateSave initiateFederateSave) + public WriteFuture initiateFederateSave( + InitiateFederateSave initiateFederateSave) { saveStatus = SaveStatus.FEDERATE_INSTRUCTED_TO_SAVE; - session.write(initiateFederateSave); + return session.write(initiateFederateSave); } public void federateSaveInitiated(FederateSaveInitiated federateSaveInitiated) @@ -133,18 +136,18 @@ saveStatus = SaveStatus.FEDERATE_WAITING_FOR_FEDERATION_TO_SAVE; } - public void federationSaved(FederationSaved federationSaved) + public WriteFuture federationSaved(FederationSaved federationSaved) { saveStatus = SaveStatus.NO_SAVE_IN_PROGRESS; - session.write(federationSaved); + return session.write(federationSaved); } - public void federationNotSaved(FederationNotSaved federationNotSaved) + public WriteFuture federationNotSaved(FederationNotSaved federationNotSaved) { saveStatus = SaveStatus.NO_SAVE_IN_PROGRESS; - session.write(federationNotSaved); + return session.write(federationNotSaved); } public void federateRestoreComplete( @@ -159,39 +162,44 @@ restoreStatus = RestoreStatus.NO_RESTORE_IN_PROGRESS; } - public void discoverObjectInstance( + public WriteFuture discoverObjectInstance( DiscoverObjectInstance discoverObjectInstance) { - session.write(discoverObjectInstance); + return session.write(discoverObjectInstance); } - public void reflectAttributeValues( + public WriteFuture reflectAttributeValues( ReflectAttributeValues reflectAttributeValues) { - session.write(reflectAttributeValues); + return session.write(reflectAttributeValues); } - public void receiveInteraction(ReceiveInteraction receiveInteraction) + public WriteFuture receiveInteraction(ReceiveInteraction receiveInteraction) { - session.write(receiveInteraction); + return session.write(receiveInteraction); } - public void removeObjectInstance(RemoveObjectInstance removeObjectInstance) + public WriteFuture removeObjectInstance(RemoveObjectInstance removeObjectInstance) { - session.write(removeObjectInstance); + return session.write(removeObjectInstance); } - public void requestAttributeValueUpdate( + public WriteFuture requestAttributeValueUpdate( RequestAttributeValueUpdate requestAttributeValueUpdate) { - session.write(requestAttributeValueUpdate); + return session.write(requestAttributeValueUpdate); } - public void retract(Retract retract) + public WriteFuture retract(Retract retract) { - session.write(retract); + return session.write(retract); } + public WriteFuture galtAdvanced(GALTAdvanced galtAdvanced) + { + return session.write(galtAdvanced); + } + @Override public int hashCode() { Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederateIoFilter.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederateIoFilter.java 2007-02-01 03:25:00 UTC (rev 99) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederateIoFilter.java 2007-02-01 03:28:39 UTC (rev 100) @@ -163,6 +163,9 @@ // TODO: notify the PublicationManager that subsciption interests have changed } + + federationExecution.subscribeObjectClassAttributes( + federate, subscribeObjectClassAttributes); } else if (message instanceof UnsubscribeObjectClassAttributes) { @@ -455,7 +458,7 @@ Map<AttributeHandle, AttributeSubscription> subscriptions = getSubscribedAttributeSubscriptions( reflectAttributeValues.getObjectClass()); - +System.out.printf("subscriptions for %s: %s\n", reflectAttributeValues.getObjectClass(), subscriptions); if (subscriptions == null) { reflectAttributeValues = null; Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java 2007-02-01 03:25:00 UTC (rev 99) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java 2007-02-01 03:28:39 UTC (rev 100) @@ -20,20 +20,6 @@ import net.sf.ohla.rti1516.fdd.Dimension; import net.sf.ohla.rti1516.fdd.FDD; import net.sf.ohla.rti1516.fdd.ObjectClass; -import net.sf.ohla.rti1516.messages.callbacks.AnnounceSynchronizationPoint; -import net.sf.ohla.rti1516.messages.callbacks.AttributeOwnershipAcquisitionNotification; -import net.sf.ohla.rti1516.messages.callbacks.DiscoverObjectInstance; -import net.sf.ohla.rti1516.messages.callbacks.FederationNotSaved; -import net.sf.ohla.rti1516.messages.callbacks.FederationRestoreStatusResponse; -import net.sf.ohla.rti1516.messages.callbacks.FederationSaveStatusResponse; -import net.sf.ohla.rti1516.messages.callbacks.FederationSaved; -import net.sf.ohla.rti1516.messages.callbacks.FederationSynchronized; -import net.sf.ohla.rti1516.messages.callbacks.InitiateFederateSave; -import net.sf.ohla.rti1516.messages.callbacks.ReflectAttributeValues; -import net.sf.ohla.rti1516.messages.callbacks.ReceiveInteraction; -import net.sf.ohla.rti1516.messages.callbacks.RemoveObjectInstance; -import net.sf.ohla.rti1516.messages.callbacks.SynchronizationPointRegistrationFailed; -import net.sf.ohla.rti1516.messages.callbacks.SynchronizationPointRegistrationSucceeded; import net.sf.ohla.rti1516.federation.objects.ObjectManager; import net.sf.ohla.rti1516.federation.time.TimeKeeper; import net.sf.ohla.rti1516.messages.AttributeOwnershipAcquisition; @@ -62,7 +48,6 @@ import net.sf.ohla.rti1516.messages.GetRangeBounds; import net.sf.ohla.rti1516.messages.JoinFederationExecution; import net.sf.ohla.rti1516.messages.JoinFederationExecutionResponse; -import net.sf.ohla.rti1516.messages.Message; import net.sf.ohla.rti1516.messages.NegotiatedAttributeOwnershipDivestiture; import net.sf.ohla.rti1516.messages.QueryAttributeOwnership; import net.sf.ohla.rti1516.messages.QueryFederationRestoreStatus; @@ -83,6 +68,19 @@ import net.sf.ohla.rti1516.messages.TimeAdvanceRequestAvailable; import net.sf.ohla.rti1516.messages.UnconditionalAttributeOwnershipDivestiture; import net.sf.ohla.rti1516.messages.UpdateAttributeValues; +import net.sf.ohla.rti1516.messages.callbacks.AnnounceSynchronizationPoint; +import net.sf.ohla.rti1516.messages.callbacks.AttributeOwnershipAcquisitionNotification; +import net.sf.ohla.rti1516.messages.callbacks.DiscoverObjectInstance; +import net.sf.ohla.rti1516.messages.callbacks.FederationNotSaved; +import net.sf.ohla.rti1516.messages.callbacks.FederationRestoreStatusResponse; +import net.sf.ohla.rti1516.messages.callbacks.FederationSaveStatusResponse; +import net.sf.ohla.rti1516.messages.callbacks.FederationSaved; +import net.sf.ohla.rti1516.messages.callbacks.FederationSynchronized; +import net.sf.ohla.rti1516.messages.callbacks.InitiateFederateSave; +import net.sf.ohla.rti1516.messages.callbacks.ReceiveInteraction; +import net.sf.ohla.rti1516.messages.callbacks.RemoveObjectInstance; +import net.sf.ohla.rti1516.messages.callbacks.SynchronizationPointRegistrationFailed; +import net.sf.ohla.rti1516.messages.callbacks.SynchronizationPointRegistrationSucceeded; import org.apache.mina.common.IoSession; import org.apache.mina.common.WriteFuture; @@ -192,30 +190,6 @@ } } - public void send(Message message) - { - send(message, null); - } - - public void send(Message message, Federate sender) - { - federatesLock.lock(); - try - { - for (Federate federate : federates.values()) - { - if (federate != sender) - { - federate.getSession().write(message); - } - } - } - finally - { - federatesLock.unlock(); - } - } - public void joinFederationExecution( IoSession session, JoinFederationExecution joinFederationExecution) { @@ -374,8 +348,7 @@ registerFederationSynchronizationPoint.getTag()); for (Federate f : federates.values()) { - federate.announceSynchronizationPoint( - announceSynchronizationPoint); + f.announceSynchronizationPoint(announceSynchronizationPoint); } } } @@ -413,11 +386,16 @@ if (federationExecutionSynchronizationPoint.synchronizationPointAchieved( federate.getFederateHandle())) { + FederationSynchronized federationSynchronized = + new FederationSynchronized( + federationExecutionSynchronizationPoint.getLabel()); federatesLock.lock(); try { - send(new FederationSynchronized( - federationExecutionSynchronizationPoint.getLabel())); + for (Federate f : federates.values()) + { + f.getSession().write(federationSynchronized); + } } finally { @@ -929,38 +907,6 @@ updateAttributeValues.getTransportationType(), updateAttributeValues.getUpdateTime(), updateAttributeValues.getMessageRetractionHandle()); - - if (updateAttributeValues.getSentOrderType() == OrderType.TIMESTAMP) - { - // TODO: track for future federates - } - - ReflectAttributeValues reflectAttributeValues = - new ReflectAttributeValues( - updateAttributeValues.getObjectInstanceHandle(), - updateAttributeValues.getAttributeValues(), - updateAttributeValues.getTag(), - updateAttributeValues.getSentRegionHandles(), - updateAttributeValues.getSentOrderType(), - updateAttributeValues.getTransportationType(), - updateAttributeValues.getUpdateTime(), - updateAttributeValues.getMessageRetractionHandle()); - - federatesLock.lock(); - try - { - for (Federate f : federates.values()) - { - if (f != federate) - { - f.reflectAttributeValues(reflectAttributeValues); - } - } - } - finally - { - federatesLock.unlock(); - } } finally { Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federation/objects/ObjectManager.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federation/objects/ObjectManager.java 2007-02-01 03:25:00 UTC (rev 99) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/objects/ObjectManager.java 2007-02-01 03:28:39 UTC (rev 100) @@ -94,34 +94,35 @@ AttributeHandleSet attributeHandles, AttributeSetRegionSetPairList attributesAndRegions) { + WriteFuture lastWriteFuture = null; + objectsLock.readLock().lock(); try { - WriteFuture lastWriteFuture = null; for (ObjectInstance objectInstance : objects.values()) { if (objectClass.isAssignableFrom(objectInstance.getObjectClass())) { // TODO: DDM - lastWriteFuture = federate.getSession().write( + lastWriteFuture = federate.discoverObjectInstance( new DiscoverObjectInstance( objectInstance.getObjectInstanceHandle(), objectClass.getObjectClassHandle(), objectInstance.getName())); } } - - if (lastWriteFuture != null) - { - // wait until the last discover has been sent - // - lastWriteFuture.join(); - } } finally { objectsLock.readLock().unlock(); } + + if (lastWriteFuture != null) + { + // wait until the last discover has been sent + // + lastWriteFuture.join(); + } } public void reserveObjectInstanceName(Federate federate, String name) @@ -155,7 +156,7 @@ federationExecution.getFDD().getObjectClasses().get(objectClassHandle); assert objectClass != null; - assert name != null && federate.equals( + assert name == null || federate.equals( reservedObjectInstanceNames.get(name)); ObjectInstance objectInstance = new ObjectInstance( Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federation/time/TimeKeeper.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federation/time/TimeKeeper.java 2007-02-01 03:25:00 UTC (rev 99) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/time/TimeKeeper.java 2007-02-01 03:28:39 UTC (rev 100) @@ -177,7 +177,20 @@ if (galtAdvanced) { - federationExecution.send(new GALTAdvanced(galt)); + GALTAdvanced message = new GALTAdvanced(galt); + + federationExecution.getFederatesLock().lock(); + try + { + for (Federate f : federationExecution.getFederates().values()) + { + f.galtAdvanced(message); + } + } + finally + { + federationExecution.getFederatesLock().unlock(); + } } if (timeConstrainedFederate != null) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mne...@us...> - 2007-02-01 03:25:01
|
Revision: 99 http://svn.sourceforge.net/ohla/?rev=99&view=rev Author: mnewcomb Date: 2007-01-31 19:25:00 -0800 (Wed, 31 Jan 2007) Log Message: ----------- - check sent region handles for null or isEmpty Modified Paths: -------------- trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/ReflectAttributeValues.java Modified: trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/ReflectAttributeValues.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/ReflectAttributeValues.java 2007-02-01 02:09:48 UTC (rev 98) +++ trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/ReflectAttributeValues.java 2007-02-01 03:25:00 UTC (rev 99) @@ -142,7 +142,7 @@ { if (updateTime == null) { - if (sentRegionHandles == null) + if (sentRegionHandles == null || sentRegionHandles.isEmpty()) { federateAmbassador.reflectAttributeValues( objectInstanceHandle, attributeValues, tag, sentOrderType, @@ -157,7 +157,7 @@ } else if (messageRetractionHandle == null) { - if (sentRegionHandles == null) + if (sentRegionHandles == null || sentRegionHandles.isEmpty()) { federateAmbassador.reflectAttributeValues( objectInstanceHandle, attributeValues, tag, sentOrderType, @@ -170,7 +170,7 @@ transportationType, updateTime, receivedOrderType, sentRegionHandles); } } - else if (sentRegionHandles == null) + else if (sentRegionHandles == null || sentRegionHandles.isEmpty()) { federateAmbassador.reflectAttributeValues( objectInstanceHandle, attributeValues, tag, sentOrderType, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mne...@us...> - 2007-02-01 02:09:53
|
Revision: 98 http://svn.sourceforge.net/ohla/?rev=98&view=rev Author: mnewcomb Date: 2007-01-31 18:09:48 -0800 (Wed, 31 Jan 2007) Log Message: ----------- - added a default socket acceptor Modified Paths: -------------- trunk/rti/src/java/net/sf/ohla/rti1516/RTI.java Modified: trunk/rti/src/java/net/sf/ohla/rti1516/RTI.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/RTI.java 2007-02-01 00:26:26 UTC (rev 97) +++ trunk/rti/src/java/net/sf/ohla/rti1516/RTI.java 2007-02-01 02:09:48 UTC (rev 98) @@ -93,6 +93,18 @@ } } + if (socketAcceptorProfiles.isEmpty()) + { + // add default socket acceptor profile + + SocketAcceptorProfile defaultSocketAcceptorProfile = + new SocketAcceptorProfile("localhost"); + defaultSocketAcceptorProfile.setPort(5000); + defaultSocketAcceptorProfile.setLogging(true); + socketAcceptorProfiles.put( + defaultSocketAcceptorProfile.getName(), defaultSocketAcceptorProfile); + } + log.debug("creating {} socket acceptor(s)", socketAcceptorProfiles.size()); for (SocketAcceptorProfile socketAcceptorProfile : socketAcceptorProfiles.values()) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mne...@us...> - 2007-02-01 00:26:26
|
Revision: 97 http://svn.sourceforge.net/ohla/?rev=97&view=rev Author: mnewcomb Date: 2007-01-31 16:26:26 -0800 (Wed, 31 Jan 2007) Log Message: ----------- - starting tests for centralized RTI Modified Paths: -------------- trunk/rti/src/java/net/sf/ohla/rti/OHLARTIambassador.java trunk/rti/src/java/net/sf/ohla/rti1516/OHLARTIambassador.java trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java trunk/rti/src/java/net/sf/ohla/rti1516/federate/objects/ObjectInstance.java trunk/rti/src/java/net/sf/ohla/rti1516/federate/objects/ObjectManager.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/Federate.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederateIoFilter.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/objects/ObjectManager.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/RegisterFederationSynchronizationPoint.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/ReflectAttributeValues.java Modified: trunk/rti/src/java/net/sf/ohla/rti/OHLARTIambassador.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti/OHLARTIambassador.java 2007-01-30 01:53:57 UTC (rev 96) +++ trunk/rti/src/java/net/sf/ohla/rti/OHLARTIambassador.java 2007-02-01 00:26:26 UTC (rev 97) @@ -1108,15 +1108,14 @@ { try { - if (rtiAmbassador.getJoinedFederate().reserveObjectInstanceName(name)) - { - return convert(rtiAmbassador.registerObjectInstance( - convertToObjectClassHandle(objectClassHandle), name)); - } - else - { - throw new ObjectAlreadyRegistered(name); - } + rtiAmbassador.getJoinedFederate().reserveObjectInstanceName(name); + + // TODO: wait for notification + // + // throw new ObjectAlreadyRegistered(name); + + return convert(rtiAmbassador.registerObjectInstance( + convertToObjectClassHandle(objectClassHandle), name)); } catch (IllegalName in) { Modified: trunk/rti/src/java/net/sf/ohla/rti1516/OHLARTIambassador.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/OHLARTIambassador.java 2007-01-30 01:53:57 UTC (rev 96) +++ trunk/rti/src/java/net/sf/ohla/rti1516/OHLARTIambassador.java 2007-02-01 00:26:26 UTC (rev 97) @@ -183,7 +183,7 @@ protected RTIIoHandler rtiIoHandler = new RTIIoHandler(); /** - * Allows concurrent access to all methods, but ensures that join/resign + * Allows concurrent access to all methods, but ensures that join/resignFederationExecution * are exclusive to all others. */ protected ReadWriteLock joinResignLock = new ReentrantReadWriteLock(true); Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java 2007-01-30 01:53:57 UTC (rev 96) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java 2007-02-01 00:26:26 UTC (rev 97) @@ -44,15 +44,6 @@ import net.sf.ohla.rti1516.OHLAParameterHandleValueMapFactory; import net.sf.ohla.rti1516.OHLARegionHandleSetFactory; import net.sf.ohla.rti1516.fdd.FDD; -import net.sf.ohla.rti1516.messages.callbacks.Callback; -import net.sf.ohla.rti1516.messages.callbacks.CallbackManager; -import net.sf.ohla.rti1516.messages.callbacks.ObjectInstanceNameReservationFailed; -import net.sf.ohla.rti1516.messages.callbacks.ObjectInstanceNameReservationSucceeded; -import net.sf.ohla.rti1516.messages.callbacks.ReceiveInteraction; -import net.sf.ohla.rti1516.messages.callbacks.ReflectAttributeValues; -import net.sf.ohla.rti1516.messages.callbacks.RemoveObjectInstance; -import net.sf.ohla.rti1516.messages.callbacks.SynchronizationPointRegistrationFailed; -import net.sf.ohla.rti1516.messages.callbacks.SynchronizationPointRegistrationSucceeded; import net.sf.ohla.rti1516.federate.objects.ObjectManager; import net.sf.ohla.rti1516.federate.time.TimeManager; import net.sf.ohla.rti1516.messages.FederateRestoreComplete; @@ -74,6 +65,11 @@ import net.sf.ohla.rti1516.messages.SubscribeObjectClassAttributes; import net.sf.ohla.rti1516.messages.SynchronizationPointAchieved; import net.sf.ohla.rti1516.messages.UnsubscribeObjectClassAttributes; +import net.sf.ohla.rti1516.messages.callbacks.Callback; +import net.sf.ohla.rti1516.messages.callbacks.CallbackManager; +import net.sf.ohla.rti1516.messages.callbacks.ReceiveInteraction; +import net.sf.ohla.rti1516.messages.callbacks.ReflectAttributeValues; +import net.sf.ohla.rti1516.messages.callbacks.RemoveObjectInstance; import org.apache.mina.common.IoSession; import org.apache.mina.common.WriteFuture; @@ -608,90 +604,38 @@ String label, byte[] tag, FederateHandleSet federateHandles) throws SaveInProgress, RestoreInProgress, RTIinternalError { + WriteFuture writeFuture; + federateStateLock.readLock().lock(); try { checkIfActive(); - synchronizationPointLock.lock(); - try - { - FederateSynchronizationPoint federateSynchronizationPoint = - synchronizationPoints.get(label); - if (federateSynchronizationPoint != null) - { - callbackManager.add(new SynchronizationPointRegistrationFailed( - label, - SynchronizationPointFailureReason.SYNCHRONIZATION_POINT_LABEL_NOT_UNIQUE)); - } - else - { - RegisterFederationSynchronizationPoint - registerFederationSynchronizationPoint = - new RegisterFederationSynchronizationPoint(label, tag, - federateHandles); - WriteFuture writeFuture = - rtiSession.write(registerFederationSynchronizationPoint); - - // TODO: set timeout - // - writeFuture.join(); - - if (!writeFuture.isWritten()) - { - throw new RTIinternalError("error communicating with RTI"); - } - - // TODO: set timeout - // - Object response = - registerFederationSynchronizationPoint.getResponse(); - - if (response == null) - { - callbackManager.add( - new SynchronizationPointRegistrationSucceeded(label)); - - // track the synchronization point upon success - // - synchronizationPoints.put(label, new FederateSynchronizationPoint( - label, tag, federateHandles)); - } - else if (response instanceof SynchronizationPointFailureReason) - { - callbackManager.add( - new SynchronizationPointRegistrationFailed( - label, (SynchronizationPointFailureReason) response)); - } - else - { - assert false : String.format("unexpected response: %s", response); - } - } - } - catch (InterruptedException ie) - { - throw new RTIinternalError("interrupted awaiting timeout", ie); - } - catch (ExecutionException ee) - { - throw new RTIinternalError("unable to get response", ee); - } - finally - { - synchronizationPointLock.unlock(); - } + writeFuture = rtiSession.write( + new RegisterFederationSynchronizationPoint( + label, tag, federateHandles)); } finally { federateStateLock.readLock().unlock(); } + + // TODO: set timeout + // + writeFuture.join(); + + if (!writeFuture.isWritten()) + { + throw new RTIinternalError("error communicating with RTI"); + } } public void synchronizationPointAchieved(String label) throws SynchronizationPointLabelNotAnnounced, SaveInProgress, RestoreInProgress, RTIinternalError { + WriteFuture writeFuture = null; + federateStateLock.readLock().lock(); try { @@ -710,17 +654,8 @@ { federateSynchronizationPoint.synchronizationPointAchieved(); - WriteFuture writeFuture = + writeFuture = rtiSession.write(new SynchronizationPointAchieved(label)); - - // TODO: set timeout - // - writeFuture.join(); - - if (!writeFuture.isWritten()) - { - throw new RTIinternalError("error communicating with RTI"); - } } } finally @@ -732,6 +667,18 @@ { federateStateLock.readLock().unlock(); } + + if (writeFuture != null) + { + // TODO: set timeout + // + writeFuture.join(); + + if (!writeFuture.isWritten()) + { + throw new RTIinternalError("error communicating with RTI"); + } + } } public void requestFederationSave(String label) @@ -851,6 +798,8 @@ public void federateSaveBegun() throws SaveNotInitiated, RestoreInProgress, RTIinternalError { + WriteFuture writeFuture; + federateStateLock.readLock().lock(); try { @@ -859,28 +808,30 @@ throw new SaveNotInitiated(); } - WriteFuture writeFuture = rtiSession.write(new FederateSaveBegun()); + writeFuture = rtiSession.write(new FederateSaveBegun()); - // TODO: set timeout - // - writeFuture.join(); - - if (!writeFuture.isWritten()) - { - throw new RTIinternalError("error communicating with RTI"); - } - federateSaveState = FederateSaveState.SAVING; } finally { federateStateLock.readLock().unlock(); } + + // TODO: set timeout + // + writeFuture.join(); + + if (!writeFuture.isWritten()) + { + throw new RTIinternalError("error communicating with RTI"); + } } public void federateSaveComplete() throws FederateHasNotBegunSave, RestoreInProgress, RTIinternalError { + WriteFuture writeFuture; + federateStateLock.readLock().lock(); try { @@ -891,29 +842,30 @@ throw new FederateHasNotBegunSave(); } - WriteFuture writeFuture = - rtiSession.write(new FederateSaveComplete(null)); + writeFuture = rtiSession.write(new FederateSaveComplete(null)); - // TODO: set timeout - // - writeFuture.join(); - - if (!writeFuture.isWritten()) - { - throw new RTIinternalError("error communicating with RTI"); - } - federateSaveState = FederateSaveState.WAITING_FOR_FEDERATION_TO_SAVE; } finally { federateStateLock.readLock().unlock(); } + + // TODO: set timeout + // + writeFuture.join(); + + if (!writeFuture.isWritten()) + { + throw new RTIinternalError("error communicating with RTI"); + } } public void federateSaveNotComplete() throws FederateHasNotBegunSave, RestoreInProgress, RTIinternalError { + WriteFuture writeFuture; + federateStateLock.readLock().lock(); try { @@ -924,49 +876,50 @@ throw new FederateHasNotBegunSave(); } - WriteFuture writeFuture = rtiSession.write(new FederateSaveNotComplete()); + writeFuture = rtiSession.write(new FederateSaveNotComplete()); - // TODO: set timeout - // - writeFuture.join(); - - if (!writeFuture.isWritten()) - { - throw new RTIinternalError("error communicating with RTI"); - } - federateSaveState = FederateSaveState.WAITING_FOR_FEDERATION_TO_SAVE; } finally { federateStateLock.readLock().unlock(); } + + // TODO: set timeout + // + writeFuture.join(); + + if (!writeFuture.isWritten()) + { + throw new RTIinternalError("error communicating with RTI"); + } } public void queryFederationSaveStatus() throws RestoreInProgress, RTIinternalError { + WriteFuture writeFuture; + federateStateLock.readLock().lock(); try { checkIfRestoreInProgress(); - WriteFuture writeFuture = - rtiSession.write(new QueryFederationSaveStatus()); - - // TODO: set timeout - // - writeFuture.join(); - - if (!writeFuture.isWritten()) - { - throw new RTIinternalError("error communicating with RTI"); - } + writeFuture = rtiSession.write(new QueryFederationSaveStatus()); } finally { federateStateLock.readLock().unlock(); } + + // TODO: set timeout + // + writeFuture.join(); + + if (!writeFuture.isWritten()) + { + throw new RTIinternalError("error communicating with RTI"); + } } public void requestFederationRestore(String label) @@ -993,8 +946,18 @@ // TODO: set timeout // Object response = requestFederationRestore.getResponse(); - assert response != null : - String.format("unexpected response: %s", response); + if (response instanceof SaveInProgress) + { + throw new SaveInProgress((SaveInProgress) response); + } + else if (response instanceof RestoreInProgress) + { + throw new RestoreInProgress((RestoreInProgress) response); + } + else + { + assert false : String.format("unexpected response: %s", response); + } } catch (InterruptedException ie) { @@ -1013,6 +976,8 @@ public void federateRestoreComplete() throws RestoreNotRequested, SaveInProgress, RTIinternalError { + WriteFuture writeFuture; + federateStateLock.readLock().lock(); try { @@ -1023,17 +988,8 @@ throw new RestoreNotRequested(); } - WriteFuture writeFuture = rtiSession.write(new FederateRestoreComplete()); + writeFuture = rtiSession.write(new FederateRestoreComplete()); - // TODO: set timeout - // - writeFuture.join(); - - if (!writeFuture.isWritten()) - { - throw new RTIinternalError("error communicating with RTI"); - } - federateRestoreState = FederateRestoreState.WAITING_FOR_FEDERATION_TO_RESTORE; } @@ -1041,11 +997,22 @@ { federateStateLock.readLock().unlock(); } + + // TODO: set timeout + // + writeFuture.join(); + + if (!writeFuture.isWritten()) + { + throw new RTIinternalError("error communicating with RTI"); + } } public void federateRestoreNotComplete() throws RestoreNotRequested, SaveInProgress, RTIinternalError { + WriteFuture writeFuture; + federateStateLock.readLock().lock(); try { @@ -1056,18 +1023,8 @@ throw new RestoreNotRequested(); } - WriteFuture writeFuture = - rtiSession.write(new FederateRestoreNotComplete()); + writeFuture = rtiSession.write(new FederateRestoreNotComplete()); - // TODO: set timeout - // - writeFuture.join(); - - if (!writeFuture.isWritten()) - { - throw new RTIinternalError("error communicating with RTI"); - } - federateRestoreState = FederateRestoreState.WAITING_FOR_FEDERATION_TO_RESTORE; } @@ -1075,6 +1032,15 @@ { federateStateLock.readLock().unlock(); } + + // TODO: set timeout + // + writeFuture.join(); + + if (!writeFuture.isWritten()) + { + throw new RTIinternalError("error communicating with RTI"); + } } public void queryFederationRestoreStatus() @@ -1364,7 +1330,7 @@ } } - public boolean reserveObjectInstanceName(String name) + public void reserveObjectInstanceName(String name) throws IllegalName, SaveInProgress, RestoreInProgress, RTIinternalError { if (name.startsWith("HLA")) @@ -1377,16 +1343,7 @@ { checkIfActive(); - boolean reserved = objectManager.reserveObjectInstanceName(name); - if (reserved) - { - callbackManager.add(new ObjectInstanceNameReservationSucceeded(name)); - } - else - { - callbackManager.add(new ObjectInstanceNameReservationFailed(name)); - } - return reserved; + objectManager.reserveObjectInstanceName(name); } finally { @@ -3609,7 +3566,8 @@ public void objectInstanceNameReservationSucceeded(String name) throws UnknownName, FederateInternalError { - federateAmbassador.objectInstanceNameReservationSucceeded(name); + objectManager.objectInstanceNameReservationSucceeded( + name, federateAmbassador); } @Override Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federate/objects/ObjectInstance.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/objects/ObjectInstance.java 2007-01-30 01:53:57 UTC (rev 96) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federate/objects/ObjectInstance.java 2007-02-01 00:26:26 UTC (rev 97) @@ -26,12 +26,10 @@ import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; +import net.sf.ohla.rti1516.OHLAAttributeHandleSet; +import net.sf.ohla.rti1516.OHLARegionHandleSet; import net.sf.ohla.rti1516.fdd.Attribute; import net.sf.ohla.rti1516.fdd.ObjectClass; -import net.sf.ohla.rti1516.federate.Federate; -import net.sf.ohla.rti1516.messages.callbacks.ReflectAttributeValues; -import net.sf.ohla.rti1516.OHLAAttributeHandleSet; -import net.sf.ohla.rti1516.OHLARegionHandleSet; import net.sf.ohla.rti1516.messages.AttributeOwnershipAcquisition; import net.sf.ohla.rti1516.messages.AttributeOwnershipAcquisitionIfAvailable; import net.sf.ohla.rti1516.messages.AttributeOwnershipDivestitureIfWanted; @@ -44,6 +42,7 @@ import net.sf.ohla.rti1516.messages.QueryAttributeOwnership; import net.sf.ohla.rti1516.messages.RequestAttributeValueUpdate; import net.sf.ohla.rti1516.messages.UnconditionalAttributeOwnershipDivestiture; +import net.sf.ohla.rti1516.messages.UpdateAttributeValues; import org.apache.mina.common.IoSession; import org.apache.mina.common.WriteFuture; @@ -152,8 +151,8 @@ return name; } - public void updateAttributeValues(AttributeHandleValueMap attributeValues, - byte[] tag, Federate federate) + public WriteFuture updateAttributeValues( + AttributeHandleValueMap attributeValues, byte[] tag, IoSession rtiSession) throws AttributeNotDefined, AttributeNotOwned { objectLock.readLock().lock(); @@ -161,10 +160,16 @@ { checkIfAttributeNotOwned(attributeValues.keySet()); - federate.sendToPeers(new ReflectAttributeValues( - objectInstanceHandle, objectClass.getObjectClassHandle(), - attributeValues, tag, OrderType.RECEIVE, - TransportationType.HLA_RELIABLE)); + RegionHandleSet sentRegionHandles = new OHLARegionHandleSet(); + for (AttributeHandle attributeHandle : attributeValues.keySet()) + { + sentRegionHandles.addAll( + getAttributeInstance(attributeHandle).getAssociatedRegions()); + } + + return rtiSession.write(new UpdateAttributeValues( + objectInstanceHandle, attributeValues, tag, sentRegionHandles, + OrderType.RECEIVE, TransportationType.HLA_RELIABLE)); } finally { @@ -172,10 +177,10 @@ } } - public void updateAttributeValues( + public WriteFuture updateAttributeValues( AttributeHandleValueMap attributeValues, byte[] tag, LogicalTime updateTime, MessageRetractionHandle messageRetractionHandle, - OrderType sentOrderType, Federate federate) + OrderType sentOrderType, IoSession rtiSession) throws AttributeNotDefined, AttributeNotOwned { objectLock.readLock().lock(); @@ -193,10 +198,10 @@ getAttributeInstance(attributeHandle).getAssociatedRegions()); } - federate.sendToPeers(new ReflectAttributeValues( - objectInstanceHandle, objectClass.getObjectClassHandle(), - attributeValues, tag, sentOrderType, TransportationType.HLA_RELIABLE, - updateTime, messageRetractionHandle, sentRegionHandles)); + return rtiSession.write(new UpdateAttributeValues( + objectInstanceHandle, attributeValues, tag, sentRegionHandles, + sentOrderType, TransportationType.HLA_RELIABLE, updateTime, + messageRetractionHandle)); } finally { @@ -267,6 +272,7 @@ // TODO: set timeout // writeFuture.join(); + if (!writeFuture.isWritten()) { throw new RTIinternalError("error communicating with RTI"); @@ -303,6 +309,7 @@ // TODO: set timeout // writeFuture.join(); + if (!writeFuture.isWritten()) { throw new RTIinternalError("error communicating with RTI"); @@ -338,6 +345,7 @@ // TODO: set timeout // writeFuture.join(); + if (!writeFuture.isWritten()) { throw new RTIinternalError("error communicating with RTI"); @@ -369,6 +377,7 @@ // TODO: set timeout // writeFuture.join(); + if (!writeFuture.isWritten()) { throw new RTIinternalError("error communicating with RTI"); @@ -430,6 +439,7 @@ // TODO: set timeout // writeFuture.join(); + if (!writeFuture.isWritten()) { throw new RTIinternalError("error communicating with RTI"); @@ -540,6 +550,7 @@ // TODO: set timeout // writeFuture.join(); + if (!writeFuture.isWritten()) { throw new RTIinternalError("error communicating with RTI"); @@ -591,6 +602,7 @@ // TODO: set timeout // writeFuture.join(); + if (!writeFuture.isWritten()) { throw new RTIinternalError("error communicating with RTI"); @@ -619,6 +631,7 @@ // TODO: set timeout // writeFuture.join(); + if (!writeFuture.isWritten()) { throw new RTIinternalError("error communicating with RTI"); @@ -686,8 +699,8 @@ } } - public void requestAttributeValueUpdate(AttributeHandleSet attributeHandles, - byte[] tag, Federate federate) + public WriteFuture requestAttributeValueUpdate( + AttributeHandleSet attributeHandles, byte[] tag, IoSession rtiSession) throws AttributeNotDefined { objectClass.checkIfAttributeNotDefined(attributeHandles); @@ -701,7 +714,7 @@ // attributeHandles.removeAll(attributes.keySet()); - federate.sendToPeers(new RequestAttributeValueUpdate( + return rtiSession.write(new RequestAttributeValueUpdate( objectInstanceHandle, attributeHandles, tag)); } finally @@ -777,6 +790,7 @@ // TODO: set timeout // writeFuture.join(); + if (!writeFuture.isWritten()) { throw new RTIinternalError("error communicating with RTI"); Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federate/objects/ObjectManager.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/objects/ObjectManager.java 2007-01-30 01:53:57 UTC (rev 96) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federate/objects/ObjectManager.java 2007-02-01 00:26:26 UTC (rev 97) @@ -6,33 +6,33 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.ExecutionException; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantReadWriteLock; +import net.sf.ohla.rti1516.OHLAAttributeHandleSet; import net.sf.ohla.rti1516.fdd.InteractionClass; import net.sf.ohla.rti1516.fdd.ObjectClass; import net.sf.ohla.rti1516.federate.Federate; import net.sf.ohla.rti1516.federate.SubscriptionManager; -import net.sf.ohla.rti1516.messages.callbacks.ReceiveInteraction; -import net.sf.ohla.rti1516.messages.callbacks.RemoveObjectInstance; -import net.sf.ohla.rti1516.messages.DefaultResponse; +import net.sf.ohla.rti1516.messages.DeleteObjectInstance; import net.sf.ohla.rti1516.messages.RegisterObjectInstance; import net.sf.ohla.rti1516.messages.ReserveObjectInstanceName; import net.sf.ohla.rti1516.messages.ResignFederationExecution; +import net.sf.ohla.rti1516.messages.SendInteraction; import net.sf.ohla.rti1516.messages.SubscribeInteractionClass; import net.sf.ohla.rti1516.messages.SubscribeObjectClassAttributes; import net.sf.ohla.rti1516.messages.UnconditionalAttributeOwnershipDivestiture; import net.sf.ohla.rti1516.messages.UnsubscribeInteractionClass; import net.sf.ohla.rti1516.messages.UnsubscribeObjectClassAttributes; -import net.sf.ohla.rti1516.OHLAAttributeHandleSet; +import net.sf.ohla.rti1516.messages.callbacks.RemoveObjectInstance; -import org.apache.mina.common.WriteFuture; import org.apache.mina.common.IoSession; +import org.apache.mina.common.WriteFuture; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -50,6 +50,7 @@ import hla.rti1516.AttributeNotPublished; import hla.rti1516.AttributeRegionAssociation; import hla.rti1516.DeletePrivilegeNotHeld; +import hla.rti1516.FederateAmbassador; import hla.rti1516.FederateOwnsAttributes; import hla.rti1516.IllegalName; import hla.rti1516.InteractionClassHandle; @@ -73,7 +74,6 @@ import hla.rti1516.RestoreInProgress; import hla.rti1516.SaveInProgress; import hla.rti1516.TransportationType; -import hla.rti1516.FederateAmbassador; public class ObjectManager { @@ -93,10 +93,9 @@ new ObjectManagerSubscriptionManager(); protected Lock reservedObjectInstanceNamesLock = new ReentrantLock(true); - protected Map<String, ObjectInstanceHandle> reservedObjectInstanceNames = - new HashMap<String, ObjectInstanceHandle>(); - protected Map<ObjectInstanceHandle, String> reservedObjectInstanceNamesByHandle = - new HashMap<ObjectInstanceHandle, String>(); + protected Set<String> reservedObjectInstanceNames = new HashSet<String>(); + protected Set<String> objectInstanceNamesBeingReserved = + new HashSet<String>(); protected Lock retiredObjectInstanceNamesLock = new ReentrantLock(true); protected Set<String> retiredObjectInstanceNames = new HashSet<String>(); @@ -132,12 +131,10 @@ } } - public void resignFederationExecution(ResignAction resignAction) + public WriteFuture resignFederationExecution(ResignAction resignAction) throws OwnershipAcquisitionPending, FederateOwnsAttributes, RTIinternalError { - WriteFuture writeFuture; - objectsLock.readLock().lock(); try { @@ -147,21 +144,13 @@ objectInstance.checkIfFederateOwnsAttributes(); } - writeFuture = federate.getRTISession().write( + return federate.getRTISession().write( new ResignFederationExecution(resignAction)); } finally { objectsLock.readLock().unlock(); } - - // TODO: set timeout - // - writeFuture.join(); - if (!writeFuture.isWritten()) - { - throw new RTIinternalError("error communicating with RTI"); - } } public void publishObjectClassAttributes(ObjectClassHandle objectClassHandle, @@ -346,7 +335,7 @@ } } - public void subscribeObjectClassAttributes( + public WriteFuture subscribeObjectClassAttributes( ObjectClassHandle objectClassHandle, AttributeHandleSet attributeHandles, boolean passive) throws RTIinternalError @@ -357,23 +346,9 @@ subscriptionManager.subscribeObjectClassAttributes( objectClassHandle, attributeHandles, passive); - SubscribeObjectClassAttributes subscribeObjectClassAttributes = + return federate.getRTISession().write( new SubscribeObjectClassAttributes( - objectClassHandle, attributeHandles, passive); - - WriteFuture writeFuture = - federate.getRTISession().write(subscribeObjectClassAttributes); - - // TODO: set timeout - // - writeFuture.join(); - - if (!writeFuture.isWritten()) - { - throw new RTIinternalError("error communicating with RTI"); - } - - federate.sendToPeers(subscribeObjectClassAttributes); + objectClassHandle, attributeHandles, passive)); } finally { @@ -381,15 +356,16 @@ } } - public void unsubscribeObjectClass(ObjectClassHandle objectClassHandle) + public WriteFuture unsubscribeObjectClass(ObjectClassHandle objectClassHandle) + throws RTIinternalError { subscriptionLock.writeLock().lock(); try { subscriptionManager.unsubscribeObjectClass(objectClassHandle); - federate.sendToPeers(new UnsubscribeObjectClassAttributes( - objectClassHandle)); + return federate.getRTISession().write( + new UnsubscribeObjectClassAttributes(objectClassHandle)); } finally { @@ -397,8 +373,9 @@ } } - public void unsubscribeObjectClassAttributes( + public WriteFuture unsubscribeObjectClassAttributes( ObjectClassHandle objectClassHandle, AttributeHandleSet attributeHandles) + throws RTIinternalError { subscriptionLock.writeLock().lock(); try @@ -406,8 +383,9 @@ subscriptionManager.unsubscribeObjectClassAttributes( objectClassHandle, attributeHandles); - federate.sendToPeers(new UnsubscribeObjectClassAttributes( - objectClassHandle, attributeHandles)); + return federate.getRTISession().write( + new UnsubscribeObjectClassAttributes( + objectClassHandle, attributeHandles)); } finally { @@ -415,8 +393,9 @@ } } - public void subscribeInteractionClass( + public WriteFuture subscribeInteractionClass( InteractionClassHandle interactionClassHandle, boolean passive) + throws RTIinternalError { subscriptionLock.writeLock().lock(); try @@ -424,7 +403,7 @@ subscriptionManager.subscribeInteractionClass( interactionClassHandle, passive); - federate.sendToPeers( + return federate.getRTISession().write( new SubscribeInteractionClass(interactionClassHandle, passive)); } finally @@ -433,16 +412,17 @@ } } - public void unsubscribeInteractionClass( + public WriteFuture unsubscribeInteractionClass( InteractionClassHandle interactionClassHandle) + throws RTIinternalError { subscriptionLock.writeLock().lock(); try { subscriptionManager.unsubscribeInteractionClass(interactionClassHandle); - federate.sendToPeers(new UnsubscribeInteractionClass( - interactionClassHandle)); + return federate.getRTISession().write( + new UnsubscribeInteractionClass(interactionClassHandle)); } finally { @@ -494,17 +474,24 @@ } } - public boolean reserveObjectInstanceName(String name) + public WriteFuture reserveObjectInstanceName(String name) throws IllegalName, RTIinternalError { reservedObjectInstanceNamesLock.lock(); try { - if (reservedObjectInstanceNames.containsKey(name)) + if (reservedObjectInstanceNames.contains(name)) { - throw new IllegalName( - String.format("object instance name already reserved: %s", name)); + throw new IllegalName(String.format( + "object instance name already reserved: %s", name)); } + else if (objectInstanceNamesBeingReserved.contains(name)) + { + throw new IllegalName(String.format( + "object instance name already being reserved: %s", name)); + } + + objectInstanceNamesBeingReserved.add(name); } finally { @@ -525,49 +512,7 @@ retiredObjectInstanceNamesLock.unlock(); } - ReserveObjectInstanceName reserveObjectInstanceName = - new ReserveObjectInstanceName(name); - WriteFuture writeFuture = - federate.getRTISession().write(reserveObjectInstanceName); - - // TODO: set timeout - // - writeFuture.join(); - - if (!writeFuture.isWritten()) - { - throw new RTIinternalError("error communicating with RTI"); - } - - try - { - // TODO: set timeout - // - Object response = reserveObjectInstanceName.getResponse(); - boolean reserved = response instanceof ObjectInstanceHandle; - if (reserved) - { - reservedObjectInstanceNamesLock.lock(); - try - { - reservedObjectInstanceNames.put( - name, (ObjectInstanceHandle) response); - } - finally - { - reservedObjectInstanceNamesLock.unlock(); - } - } - return reserved; - } - catch (InterruptedException ie) - { - throw new RTIinternalError("interrupted awaiting timeout", ie); - } - catch (ExecutionException ee) - { - throw new RTIinternalError("unable to get response", ee); - } + return federate.getRTISession().write(new ReserveObjectInstanceName(name)); } public ObjectInstanceHandle registerObjectInstance( @@ -579,58 +524,40 @@ federate.getFDD().getObjectClass(objectClassHandle); assert objectClass != null; + Set<AttributeHandle> publishedAttributeHandles; + RegisterObjectInstance registerObjectInstance; + WriteFuture writeFuture; + publicationLock.readLock().lock(); try { - Set<AttributeHandle> publishedAttributeHandles = + publishedAttributeHandles = getPublishedObjectClassAttributes(objectClassHandle); - RegisterObjectInstance registerObjectInstance = - new RegisterObjectInstance(objectClassHandle, - publishedAttributeHandles); - WriteFuture writeFuture = - federate.getRTISession().write(registerObjectInstance); + registerObjectInstance = new RegisterObjectInstance( + objectClassHandle, publishedAttributeHandles); + writeFuture = federate.getRTISession().write(registerObjectInstance); + } + finally + { + publicationLock.readLock().unlock(); + } - // TODO: set timeout - // - writeFuture.join(); + // TODO: set timeout + // + writeFuture.join(); - if (!writeFuture.isWritten()) - { - throw new RTIinternalError("error communicating with RTI"); - } + if (!writeFuture.isWritten()) + { + throw new RTIinternalError("error communicating with RTI"); + } + Object response; + try + { // TODO: set timeout // - Object response = registerObjectInstance.getResponse(); - -// assert response instanceof ObjectInstanceRegistered : -// String.format("unexpected response: %s"); - - ObjectInstanceHandle objectInstanceHandle = - objectInstanceRegistered.getObjectInstanceHandle(); - String name = String.format("HLA-%s", objectInstanceHandle); - - ObjectInstance objectInstance = - new ObjectInstance(objectInstanceHandle, objectClass, name, - publishedAttributeHandles); - - objectsLock.writeLock().lock(); - try - { - objects.put(objectInstanceHandle, objectInstance); - objectsByName.put(name, objectInstance); - getObjectsByClassHandle(objectClassHandle).add(objectInstanceHandle); - } - finally - { - objectsLock.writeLock().unlock(); - } - - federate.getRTISession().write(new DefaultResponse( - objectInstanceRegistered.getId())); - - return objectInstanceHandle; + response = registerObjectInstance.getResponse(); } catch (InterruptedException ie) { @@ -640,10 +567,33 @@ { throw new RTIinternalError("unable to get response", ee); } + + assert response instanceof ObjectInstanceHandle : + String.format("unexpected response: %s", response); + + ObjectInstanceHandle objectInstanceHandle = (ObjectInstanceHandle) response; + + // TODO: get this from response + // + String name = String.format("HLA-%s", objectInstanceHandle); + + ObjectInstance objectInstance = + new ObjectInstance(objectInstanceHandle, objectClass, name, + publishedAttributeHandles); + + objectsLock.writeLock().lock(); + try + { + objects.put(objectInstanceHandle, objectInstance); + objectsByName.put(name, objectInstance); + getObjectsByClassHandle(objectClassHandle).add(objectInstanceHandle); + } finally { - publicationLock.readLock().unlock(); + objectsLock.writeLock().unlock(); } + + return objectInstanceHandle; } public ObjectInstanceHandle registerObjectInstance( @@ -655,10 +605,14 @@ ObjectClass objectClass = federate.getFDD().getObjectClass(objectClassHandle); + Set<AttributeHandle> publishedAttributeHandles; + RegisterObjectInstance registerObjectInstance; + WriteFuture writeFuture; + publicationLock.readLock().lock(); try { - Set<AttributeHandle> publishedAttributeHandles = + publishedAttributeHandles = getPublishedObjectClassAttributes(objectClassHandle); objectsLock.writeLock().lock(); @@ -681,60 +635,30 @@ objectsLock.writeLock().unlock(); } - RegisterObjectInstance registerObjectInstance = - new RegisterObjectInstance(objectClassHandle, - publishedAttributeHandles); - WriteFuture writeFuture = - federate.getRTISession().write(registerObjectInstance); + registerObjectInstance = new RegisterObjectInstance( + objectClassHandle, publishedAttributeHandles); + writeFuture = federate.getRTISession().write(registerObjectInstance); + } + finally + { + publicationLock.readLock().unlock(); + } - // TODO: set timeout - // - writeFuture.join(); + // TODO: set timeout + // + writeFuture.join(); - if (!writeFuture.isWritten()) - { - throw new RTIinternalError("error communicating with RTI"); - } + if (!writeFuture.isWritten()) + { + throw new RTIinternalError("error communicating with RTI"); + } + Object response; + try + { // TODO: set timeout // - Object response = registerObjectInstance.getResponse(); - -// assert response instanceof ObjectInstanceRegistered : -// String.format("unexpected response: %s"); - - ObjectInstanceHandle objectInstanceHandle = - objectInstanceRegistered.getObjectInstanceHandle(); - - ObjectInstance objectInstance = - new ObjectInstance(objectInstanceHandle, objectClass, name, - publishedAttributeHandles); - - objectsLock.writeLock().lock(); - try - { - objects.put(objectInstanceHandle, objectInstance); - objectsByName.put(name, objectInstance); - getObjectsByClassHandle(objectClassHandle).add(objectInstanceHandle); - } - finally - { - objectsLock.writeLock().unlock(); - } - - writeFuture = federate.getRTISession().write(new DefaultResponse( - objectInstanceRegistered.getId())); - - // TODO: set timeout - // - writeFuture.join(); - - if (!writeFuture.isWritten()) - { - throw new RTIinternalError("error communicating with RTI"); - } - - return objectInstanceHandle; + response = registerObjectInstance.getResponse(); } catch (InterruptedException ie) { @@ -744,23 +668,42 @@ { throw new RTIinternalError("unable to get response", ee); } + + assert response instanceof ObjectInstanceHandle : + String.format("unexpected response: %s", response); + + ObjectInstanceHandle objectInstanceHandle = (ObjectInstanceHandle) response; + + ObjectInstance objectInstance = + new ObjectInstance(objectInstanceHandle, objectClass, name, + publishedAttributeHandles); + + objectsLock.writeLock().lock(); + try + { + objects.put(objectInstanceHandle, objectInstance); + objectsByName.put(name, objectInstance); + getObjectsByClassHandle(objectClassHandle).add(objectInstanceHandle); + } finally { - publicationLock.readLock().unlock(); + objectsLock.writeLock().unlock(); } + + return objectInstanceHandle; } - public void updateAttributeValues(ObjectInstanceHandle objectInstanceHandle, - AttributeHandleValueMap attributeValues, - byte[] tag) + public WriteFuture updateAttributeValues( + ObjectInstanceHandle objectInstanceHandle, + AttributeHandleValueMap attributeValues, byte[] tag) throws ObjectInstanceNotKnown, AttributeNotDefined, AttributeNotOwned, RTIinternalError { objectsLock.readLock().lock(); try { - getObjectInstance(objectInstanceHandle).updateAttributeValues( - attributeValues, tag, federate); + return getObjectInstance(objectInstanceHandle).updateAttributeValues( + attributeValues, tag, federate.getRTISession()); } finally { @@ -768,7 +711,7 @@ } } - public void updateAttributeValues( + public WriteFuture updateAttributeValues( ObjectInstanceHandle objectInstanceHandle, AttributeHandleValueMap attributeValues, byte[] tag, LogicalTime updateTime, MessageRetractionHandle messageRetractionHandle, OrderType sentOrderType) @@ -778,9 +721,9 @@ objectsLock.readLock().lock(); try { - getObjectInstance(objectInstanceHandle).updateAttributeValues( + return getObjectInstance(objectInstanceHandle).updateAttributeValues( attributeValues, tag, updateTime, messageRetractionHandle, - sentOrderType, federate); + sentOrderType, federate.getRTISession()); } finally { @@ -788,19 +731,20 @@ } } - public void sendInteraction(InteractionClassHandle interactionClassHandle, - ParameterHandleValueMap parameterValues, - byte[] tag) - throws InteractionClassNotPublished + public WriteFuture sendInteraction( + InteractionClassHandle interactionClassHandle, + ParameterHandleValueMap parameterValues, byte[] tag) + throws InteractionClassNotPublished, RTIinternalError { publicationLock.readLock().lock(); try { checkIfInteractionClassNotPublished(interactionClassHandle); - federate.sendToPeers(new ReceiveInteraction( - interactionClassHandle, parameterValues, tag, OrderType.RECEIVE, - TransportationType.HLA_RELIABLE)); + return federate.getRTISession().write( + new SendInteraction( + interactionClassHandle, parameterValues, tag, OrderType.RECEIVE, + TransportationType.HLA_RELIABLE)); } finally { @@ -808,20 +752,21 @@ } } - public void sendInteraction( + public WriteFuture sendInteraction( InteractionClassHandle interactionClassHandle, ParameterHandleValueMap parameterValues, byte[] tag, LogicalTime sendTime, MessageRetractionHandle messageRetractionHandle, OrderType sentOrderType) - throws InteractionClassNotPublished + throws InteractionClassNotPublished, RTIinternalError { publicationLock.readLock().lock(); try { checkIfInteractionClassNotPublished(interactionClassHandle); - federate.sendToPeers(new ReceiveInteraction( - interactionClassHandle, parameterValues, tag, sentOrderType, - TransportationType.HLA_RELIABLE, sendTime, messageRetractionHandle)); + return federate.getRTISession().write( + new SendInteraction( + interactionClassHandle, parameterValues, tag, sentOrderType, + TransportationType.HLA_RELIABLE, sendTime, messageRetractionHandle)); } finally { @@ -829,12 +774,10 @@ } } - public void deleteObjectInstance( + public WriteFuture deleteObjectInstance( ObjectInstanceHandle objectInstanceHandle, byte[] tag) throws ObjectInstanceNotKnown, DeletePrivilegeNotHeld, RTIinternalError { - WriteFuture writeFuture; - objectsLock.writeLock().lock(); try { @@ -843,31 +786,21 @@ removeObjectInstance(objectInstance); - writeFuture = federate.getRTISession().write(new RemoveObjectInstance( - objectInstanceHandle, tag, OrderType.RECEIVE)); + return federate.getRTISession().write( + new DeleteObjectInstance(objectInstanceHandle, tag, OrderType.RECEIVE)); } finally { objectsLock.writeLock().unlock(); } - - // TODO: set timeout - // - writeFuture.join(); - if (!writeFuture.isWritten()) - { - throw new RTIinternalError("error communicating with RTI"); - } } - public void deleteObjectInstance( + public WriteFuture deleteObjectInstance( ObjectInstanceHandle objectInstanceHandle, byte[] tag, LogicalTime deleteTime, MessageRetractionHandle messageRetractionHandle, OrderType sentOrderType) throws ObjectInstanceNotKnown, DeletePrivilegeNotHeld, RTIinternalError { - WriteFuture writeFuture; - objectsLock.writeLock().lock(); try { @@ -879,7 +812,7 @@ removeObjectInstance(objectInstance); } - writeFuture = federate.getRTISession().write( + return federate.getRTISession().write( new RemoveObjectInstance( objectInstanceHandle, tag, sentOrderType, deleteTime, messageRetractionHandle)); @@ -888,14 +821,6 @@ { objectsLock.writeLock().unlock(); } - - // TODO: set timeout - // - writeFuture.join(); - if (!writeFuture.isWritten()) - { - throw new RTIinternalError("error communicating with RTI"); - } } public void localDeleteObjectInstance( @@ -915,8 +840,31 @@ { objectsLock.writeLock().unlock(); } + } - // TODO: send local delete to peers + public void objectInstanceNameReservationSucceeded( + String name, FederateAmbassador federateAmbassador) + { + try + { + reservedObjectInstanceNamesLock.lock(); + try + { + objectInstanceNamesBeingReserved.remove(name); + reservedObjectInstanceNames.add(name); + + federateAmbassador.objectInstanceNameReservationSucceeded(name); + } + finally + { + reservedObjectInstanceNamesLock.unlock(); + } + } + catch (Throwable t) + { + log.warn(String.format( + "federate could not process name reservation success: %s", name), t); + } } public void discoverObjectInstance(ObjectInstanceHandle objectInstanceHandle, @@ -935,30 +883,18 @@ if (objectClass != null) { + ObjectInstance objectInstance = + new ObjectInstance(objectInstanceHandle, objectClass, name); + objectsLock.writeLock().lock(); try { - ObjectInstance objectInstance = - new ObjectInstance(objectInstanceHandle, objectClass, name); - ObjectInstance oldObjectInstance = - objects.put(objectInstanceHandle, objectInstance); - if (oldObjectInstance != null) - { - // the object has already been discovered, put it back and don't - // complete the callback - // - objects.put(objectInstanceHandle, oldObjectInstance); - } - else - { - objectsByName.put(name, objectInstance); - getObjectsByClassHandle(objectClassHandle).add( - objectInstanceHandle); + objects.put(objectInstanceHandle, objectInstance); + objectsByName.put(name, objectInstance); + getObjectsByClassHandle(objectClassHandle).add(objectInstanceHandle); - objectInstance.discoverObjectInstance( - objectInstanceHandle, objectClassHandle, name, - federateAmbassador); - } + objectInstance.discoverObjectInstance( + objectInstanceHandle, objectClassHandle, name, federateAmbassador); } catch (Throwable t) { @@ -989,87 +925,30 @@ subscriptionLock.readLock().lock(); try { - ObjectClass objectClass = null; - ObjectClass subscribedObjectClass = null; - objectsLock.readLock().lock(); try { ObjectInstance objectInstance = objects.get(objectInstanceHandle); if (objectInstance != null) { - objectClass = objectInstance.getObjectClass(); - subscribedObjectClass = + ObjectClass objectClass = objectInstance.getObjectClass(); + ObjectClass subscribedObjectClass = subscriptionManager.getSubscribedObjectClass(objectClass); - } - else if (!removedObjects.contains(objectInstanceHandle)) - { - // object has not been discovered yet - ObjectClassHandle objectClassHandle = - reflectedObjectClassHandles.get(objectInstanceHandle); - - objectClass = - federate.getFDD().getObjectClasses().get(objectClassHandle); - assert objectClass != null; - - subscribedObjectClass = - subscriptionManager.getSubscribedObjectClass(objectClass); - - // upgrade to a write lock - // - objectsLock.readLock().unlock(); - objectsLock.writeLock().lock(); - try + if (subscribedObjectClass != null) { - // objects only get removed/added during callbacks and only one - // callback can occur at a time (this method is called in one) - // - assert !objects.containsKey(objectInstanceHandle); - assert !removedObjects.contains(objectInstanceHandle); + if (!subscribedObjectClass.equals(objectClass)) + { + subscriptionManager.trim( + attributeValues, subscribedObjectClass.getObjectClassHandle()); + } - String name = - reservedObjectInstanceNamesByHandle.get( - objectInstanceHandle); - name = name != null ? - name : String.format("HLA-%s", objectInstanceHandle); - - objectInstance = new ObjectInstance( - objectInstanceHandle, subscribedObjectClass, name); - - objects.put(objectInstanceHandle, objectInstance); - objectsByName.put(name, objectInstance); - getObjectsByClassHandle(objectClassHandle).add( - objectInstanceHandle); - - // TODO: this means 2 callbacks are happening - // - objectInstance.discoverObjectInstance( - objectInstanceHandle, objectClassHandle, name, - federateAmbassador); + objectInstance.reflectAttributeValues( + objectInstanceHandle, attributeValues, tag, sentOrderType, + transportationType, updateTime, receivedOrderType, + messageRetractionHandle, sentRegionHandles, federateAmbassador); } - finally - { - // downgrade to read lock - // - objectsLock.readLock().lock(); - objectsLock.writeLock().unlock(); - } } - - if (objectInstance != null && subscribedObjectClass != null) - { - if (!subscribedObjectClass.equals(objectClass)) - { - subscriptionManager.trim( - attributeValues, subscribedObjectClass.getObjectClassHandle()); - } - - objectInstance.reflectAttributeValues( - objectInstanceHandle, attributeValues, tag, sentOrderType, - transportationType, updateTime, receivedOrderType, - messageRetractionHandle, sentRegionHandles, federateAmbassador); - } } catch (Throwable t) { @@ -1306,7 +1185,7 @@ try { getObjectInstance(objectInstanceHandle).requestAttributeValueUpdate( - attributeHandles, tag, federate); + attributeHandles, tag, federate.getRTISession()); } finally { @@ -1553,22 +1432,6 @@ attributeHandle, federate.getRTISession()); } - public void objectInstanceNameReserved( - String name, ObjectInstanceHandle objectInstanceHandle) - { - reservedObjectInstanceNamesLock.lock(); - try - { - ObjectInstanceHandle oldObjectInstanceHandle = - reservedObjectInstanceNames.put(name, objectInstanceHandle); - assert oldObjectInstanceHandle == null; - } - finally - { - reservedObjectInstanceNamesLock.unlock(); - } - } - protected Set<AttributeHandle> getPublishedObjectClassAttributes( ObjectClassHandle objectClassHandle) throws ObjectClassNotPublished @@ -1662,7 +1525,7 @@ reservedObjectInstanceNamesLock.lock(); try { - if (!reservedObjectInstanceNames.containsKey(name)) + if (!reservedObjectInstanceNames.contains(name)) { throw new ObjectInstanceNameNotReserved(name); } @@ -1701,7 +1564,7 @@ reservedObjectInstanceNamesLock.lock(); try { - if (reservedObjectInstanceNames.containsKey(objectInstance.getName())) + if (reservedObjectInstanceNames.contains(objectInstance.getName())) { retiredObjectInstanceNamesLock.lock(); try @@ -1720,38 +1583,6 @@ } } - public String createObjectInstanceName( - ObjectInstanceHandle objectInstanceHandle, - ObjectClassHandle objectClassHandle) - { - String objectInstanceName; - - objectsLock.readLock().lock(); - try - { - objectInstanceName = - reservedObjectInstanceNamesByHandle.get(objectInstanceHandle); - } - finally - { - objectsLock.readLock().unlock(); - } - - if (objectInstanceName == null) - { - objectInstanceName = String.format("HLA-%s", objectInstanceHandle); - } - - return objectInstanceName; - } - - public void objectReflected(ObjectInstanceHandle objectInstanceHandle, - ObjectClassHandle objectClassHandle) - { - reflectedObjectClassHandles.putIfAbsent( - objectInstanceHandle, objectClassHandle); - } - protected class ObjectManagerSubscriptionManager extends SubscriptionManager { Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federation/Federate.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federation/Federate.java 2007-01-30 01:53:57 UTC (rev 96) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/Federate.java 2007-02-01 00:26:26 UTC (rev 97) @@ -23,6 +23,7 @@ import net.sf.ohla.rti1516.messages.callbacks.ReflectAttributeValues; import net.sf.ohla.rti1516.messages.callbacks.ReceiveInteraction; import net.sf.ohla.rti1516.messages.callbacks.RemoveObjectInstance; +import net.sf.ohla.rti1516.messages.callbacks.AnnounceSynchronizationPoint; import net.sf.ohla.rti1516.messages.FederateSaveInitiated; import net.sf.ohla.rti1516.messages.FederateSaveInitiatedFailed; import net.sf.ohla.rti1516.messages.FederateSaveBegun; @@ -88,11 +89,17 @@ return restoreStatus; } - public void resign() + public void resignFederationExecution() { session.getFilterChain().remove(FEDERATE_IO_FILTER); } + public void announceSynchronizationPoint( + AnnounceSynchronizationPoint announceSynchronizationPoint) + { + session.write(announceSynchronizationPoint); + } + public void initiateFederateSave(InitiateFederateSave initiateFederateSave) { saveStatus = SaveStatus.FEDERATE_INSTRUCTED_TO_SAVE; Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederateIoFilter.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederateIoFilter.java 2007-01-30 01:53:57 UTC (rev 96) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederateIoFilter.java 2007-02-01 00:26:26 UTC (rev 97) @@ -21,10 +21,7 @@ import net.sf.ohla.rti1516.OHLAAttributeHandleValueMap; import net.sf.ohla.rti1516.OHLAParameterHandleValueMap; import net.sf.ohla.rti1516.fdd.InteractionClass; -import net.sf.ohla.rti1516.fdd.ObjectClass; import net.sf.ohla.rti1516.federate.SubscriptionManager; -import net.sf.ohla.rti1516.messages.callbacks.ReceiveInteraction; -import net.sf.ohla.rti1516.messages.callbacks.ReflectAttributeValues; import net.sf.ohla.rti1516.messages.AttributeOwnershipAcquisition; import net.sf.ohla.rti1516.messages.AttributeOwnershipAcquisitionIfAvailable; import net.sf.ohla.rti1516.messages.AttributeOwnershipDivestitureIfWanted; @@ -33,6 +30,7 @@ import net.sf.ohla.rti1516.messages.CommitRegionModifications; import net.sf.ohla.rti1516.messages.ConfirmDivestiture; import net.sf.ohla.rti1516.messages.CreateRegion; +import net.sf.ohla.rti1516.messages.DeleteObjectInstance; import net.sf.ohla.rti1516.messages.DeleteRegion; import net.sf.ohla.rti1516.messages.DisableTimeConstrained; import net.sf.ohla.rti1516.messages.DisableTimeRegulation; @@ -66,6 +64,10 @@ import net.sf.ohla.rti1516.messages.UnconditionalAttributeOwnershipDivestiture; import net.sf.ohla.rti1516.messages.UnsubscribeInteractionClass; import net.sf.ohla.rti1516.messages.UnsubscribeObjectClassAttributes; +import net.sf.ohla.rti1516.messages.UpdateAttributeValues; +import net.sf.ohla.rti1516.messages.SendInteraction; +import net.sf.ohla.rti1516.messages.callbacks.ReceiveInteraction; +import net.sf.ohla.rti1516.messages.callbacks.ReflectAttributeValues; import org.apache.mina.common.IoFilterAdapter; import org.apache.mina.common.IoSession; @@ -73,7 +75,6 @@ import hla.rti1516.AttributeHandle; import hla.rti1516.AttributeHandleValueMap; import hla.rti1516.InteractionClassHandle; -import hla.rti1516.ObjectClassHandle; import hla.rti1516.ObjectInstanceHandle; import hla.rti1516.ParameterHandleValueMap; @@ -105,8 +106,18 @@ Object message) throws Exception { - if (message instanceof RegisterObjectInstance) + if (message instanceof UpdateAttributeValues) { + federationExecution.updateAttributeValues( + federate, (UpdateAttributeValues) message); + } + else if (message instanceof SendInteraction) + { + federationExecution.sendInteraction( + federate, (SendInteraction) message); + } + else if (message instanceof RegisterObjectInstance) + { federationExecution.registerObjectInstance( federate, (RegisterObjectInstance) message); } @@ -440,15 +451,10 @@ { ObjectInstanceHandle objectInstanceHandle = reflectAttributeValues.getObjectInstanceHandle(); - ObjectClassHandle objectClassHandle = - reflectAttributeValues.getObjectClassHandle(); - ObjectClass objectClass = - federationExecution.getFDD().getObjectClasses().get(objectClassHandle); - assert objectClass != null; - Map<AttributeHandle, AttributeSubscription> subscriptions = - getSubscribedAttributeSubscriptions(objectClass); + getSubscribedAttributeSubscriptions( + reflectAttributeValues.getObjectClass()); if (subscriptions == null) { @@ -464,13 +470,13 @@ // TODO: DDM reflectAttributeValues = new ReflectAttributeValues( - objectInstanceHandle, objectClassHandle, trimmedAttributeValues, + objectInstanceHandle, trimmedAttributeValues, reflectAttributeValues.getTag(), + reflectAttributeValues.getSentRegionHandles(), reflectAttributeValues.getSentOrderType(), reflectAttributeValues.getTransportationType(), reflectAttributeValues.getUpdateTime(), - reflectAttributeValues.getMessageRetractionHandle(), - reflectAttributeValues.getSentRegionHandles()); + reflectAttributeValues.getMessageRetractionHandle()); } return reflectAttributeValues; Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java 2007-01-30 01:53:57 UTC (rev 96) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java 2007-02-01 00:26:26 UTC (rev 97) @@ -32,6 +32,8 @@ import net.sf.ohla.rti1516.messages.callbacks.ReflectAttributeValues; import net.sf.ohla.rti1516.messages.callbacks.ReceiveInteraction; import net.sf.ohla.rti1516.messages.callbacks.RemoveObjectInstance; +import net.sf.ohla.rti1516.messages.callbacks.SynchronizationPointRegistrationFailed; +import net.sf.ohla.rti1516.message... [truncated message content] |
From: <mne...@us...> - 2007-01-30 01:53:57
|
Revision: 96 http://svn.sourceforge.net/ohla/?rev=96&view=rev Author: mnewcomb Date: 2007-01-29 17:53:57 -0800 (Mon, 29 Jan 2007) Log Message: ----------- - almost complete refactor to centralized RTI Modified Paths: -------------- trunk/rti/src/java/net/sf/ohla/rti1516/RTI.java trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java trunk/rti/src/java/net/sf/ohla/rti1516/federate/FederateSave.java trunk/rti/src/java/net/sf/ohla/rti1516/federate/objects/ObjectInstance.java trunk/rti/src/java/net/sf/ohla/rti1516/federate/objects/ObjectManager.java trunk/rti/src/java/net/sf/ohla/rti1516/federate/time/TimeManager.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/time/TimeConstrainedFederate.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/time/TimeKeeper.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/time/TimeRegulatingFederate.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/FederateSaveInitiated.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/JoinFederationExecution.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/JoinFederationExecutionResponse.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/ReserveObjectInstanceName.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/AnnounceSynchronizationPoint.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/AttributeIsNotOwned.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/AttributeIsOwnedByRTI.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/AttributeOwnershipAcquisitionNotification.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/AttributeOwnershipUnavailable.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/AttributesInScope.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/AttributesOutOfScope.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/Callback.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/CallbackManager.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/ConfirmAttributeOwnershipAcquisitionCancellation.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/DiscoverObjectInstance.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/FederationNotRestored.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/FederationNotSaved.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/FederationRestoreBegun.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/FederationRestoreStatusResponse.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/FederationRestored.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/FederationSaveStatusResponse.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/FederationSaved.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/FederationSynchronized.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/InformAttributeOwnership.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/InitiateFederateRestore.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/InitiateFederateSave.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/ObjectInstanceNameReservationFailed.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/ObjectInstanceNameReservationSucceeded.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/ProvideAttributeValueUpdate.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/ReceiveInteraction.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/ReflectAttributeValues.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/RemoveObjectInstance.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/RequestAttributeOwnershipAssumption.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/RequestAttributeOwnershipRelease.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/RequestDivestitureConfirmation.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/RequestFederationRestoreFailed.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/RequestFederationRestoreSucceeded.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/RequestRetraction.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/StartRegistrationForObjectClass.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/StopRegistrationForObjectClass.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/SynchronizationPointRegistrationFailed.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/SynchronizationPointRegistrationSucceeded.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/TimeAdvanceGrant.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/TimeConstrainedEnabled.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/TimeRegulationEnabled.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/TurnInteractionsOff.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/TurnInteractionsOn.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/TurnUpdatesOffForObjectInstance.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/TurnUpdatesOnForObjectInstance.java Added Paths: ----------- trunk/rti/src/java/net/sf/ohla/rti1516/federation/Federate.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederateIoFilter.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/objects/ trunk/rti/src/java/net/sf/ohla/rti1516/federation/objects/AttributeInstance.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/objects/ObjectInstance.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/objects/ObjectManager.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/DeleteObjectInstance.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/SendInteraction.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/UpdateAttributeValues.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/ Removed Paths: ------------- trunk/rti/src/java/net/sf/ohla/rti1516/messages/DeleteObjectInstance.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/ObjectInstanceNameReserved.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/ObjectInstanceRegistered.java Modified: trunk/rti/src/java/net/sf/ohla/rti1516/RTI.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/RTI.java 2007-01-30 01:52:49 UTC (rev 95) +++ trunk/rti/src/java/net/sf/ohla/rti1516/RTI.java 2007-01-30 01:53:57 UTC (rev 96) @@ -39,8 +39,6 @@ public class RTI { - public static final String FEDERATION_EXECUTION = "FederationExecution"; - private static final Logger log = LoggerFactory.getLogger(RTI.class); public static final String OHLA_RTI_ACCEPTOR_PATTERN = @@ -218,7 +216,7 @@ federations.get(federationExecutionName); if (federationExecution != null) { - federationExecution.process( + federationExecution.joinFederationExecution( session, joinFederationExecution); } else @@ -251,38 +249,24 @@ public void messageReceived(IoSession session, Object message) throws Exception { - FederationExecution federationExecution = getFederationExecution(session); - if (federationExecution == null || - !federationExecution.process(session, message)) + if (message instanceof CreateFederationExecution) { - // there was no FederationExecution associated with this channel or - // the one associated could not createFederationExecution the message - - if (message instanceof CreateFederationExecution) - { - createFederationExecution( - session, (CreateFederationExecution) message); - } - else if (message instanceof DestroyFederationExecution) - { - destroyFederationExecution( - session, (DestroyFederationExecution) message); - } - else if (message instanceof JoinFederationExecution) - { - joinFederationExecution(session, (JoinFederationExecution) message); - } - else - { - assert false : String.format("unexpected message: %s", message); - } + createFederationExecution(session, (CreateFederationExecution) message); } + else if (message instanceof DestroyFederationExecution) + { + destroyFederationExecution( + session, (DestroyFederationExecution) message); + } + else if (message instanceof JoinFederationExecution) + { + joinFederationExecution(session, (JoinFederationExecution) message); + } + else + { + assert false : String.format("unexpected message: %s", message); + } } - - protected FederationExecution getFederationExecution(IoSession session) - { - return (FederationExecution) session.getAttribute(FEDERATION_EXECUTION); - } } protected class SocketAcceptorProfile Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java 2007-01-30 01:52:49 UTC (rev 95) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java 2007-01-30 01:53:57 UTC (rev 96) @@ -16,12 +16,6 @@ package net.sf.ohla.rti1516.federate; -import java.io.IOException; -import java.net.InetAddress; -import java.net.InetSocketAddress; -import java.net.SocketAddress; -import java.net.UnknownHostException; - import java.util.HashMap; import java.util.Map; import java.util.PriorityQueue; @@ -50,35 +44,25 @@ import net.sf.ohla.rti1516.OHLAParameterHandleValueMapFactory; import net.sf.ohla.rti1516.OHLARegionHandleSetFactory; import net.sf.ohla.rti1516.fdd.FDD; -import net.sf.ohla.rti1516.federate.callbacks.Callback; -import net.sf.ohla.rti1516.federate.callbacks.CallbackManager; -import net.sf.ohla.rti1516.federate.callbacks.DiscoverObjectInstance; -import net.sf.ohla.rti1516.federate.callbacks.InitiateFederateRestore; -import net.sf.ohla.rti1516.federate.callbacks.InitiateFederateSave; -import net.sf.ohla.rti1516.federate.callbacks.ObjectInstanceNameReservationFailed; -import net.sf.ohla.rti1516.federate.callbacks.ObjectInstanceNameReservationSucceeded; -import net.sf.ohla.rti1516.federate.callbacks.ReceiveInteraction; -import net.sf.ohla.rti1516.federate.callbacks.ReflectAttributeValues; -import net.sf.ohla.rti1516.federate.callbacks.RemoveObjectInstance; -import net.sf.ohla.rti1516.federate.callbacks.SynchronizationPointRegistrationFailed; -import net.sf.ohla.rti1516.federate.callbacks.SynchronizationPointRegistrationSucceeded; -import net.sf.ohla.rti1516.federate.filter.InterestManagementFilter; +import net.sf.ohla.rti1516.messages.callbacks.Callback; +import net.sf.ohla.rti1516.messages.callbacks.CallbackManager; +import net.sf.ohla.rti1516.messages.callbacks.ObjectInstanceNameReservationFailed; +import net.sf.ohla.rti1516.messages.callbacks.ObjectInstanceNameReservationSucceeded; +import net.sf.ohla.rti1516.messages.callbacks.ReceiveInteraction; +import net.sf.ohla.rti1516.messages.callbacks.ReflectAttributeValues; +import net.sf.ohla.rti1516.messages.callbacks.RemoveObjectInstance; +import net.sf.ohla.rti1516.messages.callbacks.SynchronizationPointRegistrationFailed; +import net.sf.ohla.rti1516.messages.callbacks.SynchronizationPointRegistrationSucceeded; import net.sf.ohla.rti1516.federate.objects.ObjectManager; import net.sf.ohla.rti1516.federate.time.TimeManager; -import net.sf.ohla.rti1516.filter.RequestResponseFilter; -import net.sf.ohla.rti1516.messages.DefaultResponse; -import net.sf.ohla.rti1516.messages.FederateJoined; import net.sf.ohla.rti1516.messages.FederateRestoreComplete; import net.sf.ohla.rti1516.messages.FederateRestoreNotComplete; import net.sf.ohla.rti1516.messages.FederateSaveBegun; import net.sf.ohla.rti1516.messages.FederateSaveComplete; -import net.sf.ohla.rti1516.messages.FederateSaveInitiated; -import net.sf.ohla.rti1516.messages.FederateSaveInitiatedFailed; import net.sf.ohla.rti1516.messages.FederateSaveNotComplete; +import net.sf.ohla.rti1516.messages.GALTAdvanced; import net.sf.ohla.rti1516.messages.JoinFederationExecution; import net.sf.ohla.rti1516.messages.JoinFederationExecutionResponse; -import net.sf.ohla.rti1516.messages.Message; -import net.sf.ohla.rti1516.messages.ObjectInstanceNameReserved; import net.sf.ohla.rti1516.messages.QueryFederationRestoreStatus; import net.sf.ohla.rti1516.messages.QueryFederationSaveStatus; import net.sf.ohla.rti1516.messages.RegisterFederationSynchronizationPoint; @@ -86,21 +70,13 @@ import net.sf.ohla.rti1516.messages.RequestFederationRestore; import net.sf.ohla.rti1516.messages.RequestFederationSave; import net.sf.ohla.rti1516.messages.Retract; +import net.sf.ohla.rti1516.messages.SendInteraction; import net.sf.ohla.rti1516.messages.SubscribeObjectClassAttributes; import net.sf.ohla.rti1516.messages.SynchronizationPointAchieved; import net.sf.ohla.rti1516.messages.UnsubscribeObjectClassAttributes; -import net.sf.ohla.rti1516.messages.GALTAdvanced; -import org.apache.mina.common.ConnectFuture; -import org.apache.mina.common.IoHandlerAdapter; import org.apache.mina.common.IoSession; import org.apache.mina.common.WriteFuture; -import org.apache.mina.filter.LoggingFilter; -import org.apache.mina.filter.codec.ProtocolCodecFactory; -import org.apache.mina.filter.codec.ProtocolCodecFilter; -import org.apache.mina.filter.codec.serialization.ObjectSerializationCodecFactory; -import org.apache.mina.transport.socket.nio.SocketAcceptor; -import org.apache.mina.transport.socket.nio.SocketConnector; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -242,11 +218,8 @@ public class Federate { - private static final String PEER_FEDERATE_HANDLE = "PeerFederateHandle"; + private static final Logger log = LoggerFactory.getLogger(Federate.class); - private static final Logger log = - LoggerFactory.getLogger(Federate.class); - public static final String OHLA_FEDERATE_HOST_PROPERTY = "ohla.federate.%s.host"; public static final String OHLA_FEDERATE_PORT_PROPERTY = @@ -328,21 +301,6 @@ */ protected IoSession rtiSession; - /** - * Handles communication with other federates (peers). - */ - protected PeerIoHandler peerIoHandler = new PeerIoHandler(); - - protected Lock peersLock = new ReentrantLock(true); - - /** - * Sessions connecting to other federates (peers). - */ - protected Map<FederateHandle, IoSession> peerSessions = - new HashMap<FederateHandle, IoSession>(); - - protected SocketAddress peerConnectionInfo; - public Federate(String federateType, String federationExecutionName, FederateAmbassador federateAmbassador, MobileFederateServices mobileFederateServices, @@ -356,12 +314,9 @@ this.mobileFederateServices = mobileFederateServices; this.rtiSession = rtiSession; - startPeerAcceptor(federateType); - JoinFederationExecution joinFederationExecution = new JoinFederationExecution( - federateType, federationExecutionName, mobileFederateServices, - peerConnectionInfo); + federateType, federationExecutionName, mobileFederateServices); WriteFuture writeFuture = rtiSession.write(joinFederationExecution); // TODO: set timeout @@ -389,72 +344,7 @@ LogicalTime galt = joinFederationExecutionResponse.getGALT(); timeManager = new TimeManager(this, mobileFederateServices, galt); - SocketConnector peerConnector = new SocketConnector(); - - peerConnector.setHandler(peerIoHandler); - - // TODO: selection of codec factory - // - ProtocolCodecFactory codec = new ObjectSerializationCodecFactory(); - - // handles messages to/from bytes - // - peerConnector.getFilterChain().addLast( - "ProtocolCodecFilter", new ProtocolCodecFilter(codec)); - - peerConnector.getFilterChain().addLast("LoggingFilter", - new LoggingFilter()); - - // handles request/response pairs - // - peerConnector.getFilterChain().addLast( - "RequestResponseFilter", new RequestResponseFilter()); - - // tracks peers interests and transforms messages to meet those - // requirements - // - peerConnector.getFilterChain().addLast( - "InterestManagementFilter", new InterestManagementFilter(this)); - - for (Map.Entry<FederateHandle, SocketAddress> entry : joinFederationExecutionResponse.getPeerConnectionInfo().entrySet()) - { - log.debug("connecting to peer: {}", entry.getValue()); - - // TODO: selection of local address to connect to peer? - // - ConnectFuture future = peerConnector.connect(entry.getValue()); - future.join(); - - IoSession peerSession = future.getSession(); - peerSession.setAttribute(PEER_FEDERATE_HANDLE, entry.getKey()); - - FederateJoined federateJoined = new FederateJoined(federateHandle); - - writeFuture = peerSession.write(federateJoined); - - // TODO: set timeout - // - writeFuture.join(); - - if (writeFuture.isWritten()) - { - // TODO: set timeout - // - federateJoined.await(); - - peersLock.lock(); - try - { - peerSessions.put(entry.getKey(), peerSession); - } - finally - { - peersLock.unlock(); - } - } - } - - log.info("joined federation execution; {}", federateHandle); + log.info("joined federation execution: {}", federateHandle); } else if (response instanceof FederationExecutionDoesNotExist) { @@ -564,99 +454,117 @@ } } - public void sendToPeers(Message message) - { - peersLock.lock(); - try - { - for (IoSession peerSession : peerSessions.values()) - { - peerSession.write(message); - } - } - finally - { - peersLock.unlock(); - } - } - public boolean process(IoSession session, Object message) { boolean processed = true; if (message instanceof Callback) { - if (message instanceof ReflectAttributeValues) + timeManager.getTimeLock().readLock().lock(); + try { - ReflectAttributeValues reflectAttributeValues = - (ReflectAttributeValues) message; + if (message instanceof ReflectAttributeValues) + { + ReflectAttributeValues reflectAttributeValues = + (ReflectAttributeValues) message; - objectManager.objectReflected( - reflectAttributeValues.getObjectInstanceHandle(), - reflectAttributeValues.getObjectClassHandle()); - } - else if (message instanceof DiscoverObjectInstance) - { - DiscoverObjectInstance discoverObjectInstance = - (DiscoverObjectInstance) message; + timeManager.getTimeLock().readLock().lock(); + try + { + OrderType receivedOrderType = + reflectAttributeValues.getSentOrderType() == OrderType.TIMESTAMP && + timeManager.isTimeConstrained() ? OrderType.TIMESTAMP : + OrderType.RECEIVE; + reflectAttributeValues.setReceivedOrderType(receivedOrderType); - String name = objectManager.createObjectInstanceName( - discoverObjectInstance.getObjectInstanceHandle(), - discoverObjectInstance.getObjectClassHandle()); - discoverObjectInstance.setName(name); - } - else if (message instanceof InitiateFederateSave) - { - InitiateFederateSave initiateFederateSave = - (InitiateFederateSave) message; + if (receivedOrderType == OrderType.RECEIVE) + { + // receive order callbacks need to be held until released if we + // are constrained and in the time granted state if asynchronous + // delivery is disabled + // + boolean hold = timeManager.isTimeConstrainedAndTimeGranted() && + !isAsynchronousDeliveryEnabled(); - federateStateLock.writeLock().lock(); - try - { - if (federateSave == null) + callbackManager.add(reflectAttributeValues, hold); + } + else + { + // schedule the callback for the appropriate time + // + Future future = schedule( + reflectAttributeValues.getUpdateTime(), + new AddCallback(reflectAttributeValues)); + + // register the message retraction handle + // + messageRetractionManager.add( + reflectAttributeValues.getUpdateTime(), future, + reflectAttributeValues.getMessageRetractionHandle()); + } + } + finally { - federateSave = new FederateSave( - federateHandle, federateType, - initiateFederateSave.getParticipants()); + timeManager.getTimeLock().readLock().unlock(); } } - finally + else if (message instanceof ReceiveInteraction) { - federateStateLock.writeLock().unlock(); - } - } - else if (message instanceof InitiateFederateRestore) - { - } + ReceiveInteraction receiveInteraction = (ReceiveInteraction) message; - timeManager.getTimeLock().readLock().lock(); - try - { - boolean hold = false; + timeManager.getTimeLock().readLock().lock(); + try + { + OrderType receivedOrderType = + receiveInteraction.getSentOrderType() == OrderType.TIMESTAMP && + timeManager.isTimeConstrained() ? OrderType.TIMESTAMP : + OrderType.RECEIVE; - if (message instanceof ReflectAttributeValues || - message instanceof ReceiveInteraction || - message instanceof RemoveObjectInstance) - { - hold = !isAsynchronousDeliveryEnabled() && - timeManager.isTimeConstrainedAndTimeGranted(); + receiveInteraction.setReceivedOrderType(receivedOrderType); + + if (receivedOrderType == OrderType.RECEIVE) + { + // receive order callbacks need to be held until released if we + // are constrained and in the time granted state, if asynchronous + // delivery is disabled + // + boolean hold = timeManager.isTimeConstrainedAndTimeGranted() && + !isAsynchronousDeliveryEnabled(); + + callbackManager.add(receiveInteraction, hold); + } + else + { + // schedule the callback for the appropriate time + // + Future future = schedule(receiveInteraction.getSendTime(), + new AddCallback(receiveInteraction)); + + // register the message retraction handle + // + messageRetractionManager.add( + receiveInteraction.getSendTime(), future, + receiveInteraction.getMessageRetractionHandle()); + } + } + finally + { + timeManager.getTimeLock().readLock().unlock(); + } } + else + { + boolean hold = message instanceof RemoveObjectInstance && + !isAsynchronousDeliveryEnabled() && + timeManager.isTimeConstrainedAndTimeGranted(); - callbackManager.add((Callback) message, hold); + callbackManager.add((Callback) message, hold); + } } finally { timeManager.getTimeLock().readLock().unlock(); } } - else if (message instanceof ObjectInstanceNameReserved) - { - ObjectInstanceNameReserved objectInstanceNameReserved = - (ObjectInstanceNameReserved) message; - - objectManager.objectInstanceNameReserved( - objectInstanceNameReserved.getName(), - objectInstanceNameReserved.getObjectInstanceHandle()); - } else if (message instanceof GALTAdvanced) { GALTAdvanced galtAdvanced = (GALTAdvanced) message; @@ -2626,8 +2534,18 @@ objectClassHandle, attributeRegionAssociation, passive); } - sendToPeers(new SubscribeObjectClassAttributes( - objectClassHandle, attributesAndRegions, passive)); + WriteFuture writeFuture = rtiSession.write( + new SubscribeObjectClassAttributes( + objectClassHandle, attributesAndRegions, passive)); + + // TODO: set timeout + // + writeFuture.join(); + + if (!writeFuture.isWritten()) + { + throw new RTIinternalError("error communicating with RTI"); + } } finally { @@ -2656,8 +2574,18 @@ objectClassHandle, attributeRegionAssociation); } - sendToPeers(new UnsubscribeObjectClassAttributes( - objectClassHandle, attributesAndRegions)); + WriteFuture writeFuture = rtiSession.write( + new UnsubscribeObjectClassAttributes( + objectClassHandle, attributesAndRegions)); + + // TODO: set timeout + // + writeFuture.join(); + + if (!writeFuture.isWritten()) + { + throw new RTIinternalError("error communicating with RTI"); + } } finally { @@ -2753,9 +2681,18 @@ // objectManager.checkIfInteractionClassPublished(interactionClassHandle); - sendToPeers(new ReceiveInteraction( + WriteFuture writeFuture = rtiSession.write(new SendInteraction( interactionClassHandle, parameterValues, tag, OrderType.RECEIVE, TransportationType.HLA_RELIABLE, regionHandles)); + + // TODO: set timeout + // + writeFuture.join(); + + if (!writeFuture.isWritten()) + { + throw new RTIinternalError("error communicating with RTI"); + } } finally { @@ -2794,11 +2731,20 @@ messageRetractionHandle = messageRetractionManager.add(sendTime); } - sendToPeers(new ReceiveInteraction( - interactionClassHandle, parameterValues, tag, sentOrderType, + WriteFuture writeFuture = rtiSession.write(new SendInteraction( + interactionClassHandle, parameterValues, tag, OrderType.RECEIVE, TransportationType.HLA_RELIABLE, sendTime, messageRetractionHandle, regionHandles)); + // TODO: set timeout + // + writeFuture.join(); + + if (!writeFuture.isWritten()) + { + throw new RTIinternalError("error communicating with RTI"); + } + return new MessageRetractionReturn(messageRetractionHandle != null, messageRetractionHandle); } @@ -3293,79 +3239,6 @@ } } - protected void startPeerAcceptor(String federateType) - throws RTIinternalError - { - if (peerConnectionInfo == null) - { - String host = System.getProperties().getProperty( - String.format(OHLA_FEDERATE_HOST_PROPERTY, federateType)); - String port = System.getProperties().getProperty( - String.format(OHLA_FEDERATE_PORT_PROPERTY, federateType)); - - try - { - SocketAcceptor peerAcceptor = new SocketAcceptor(); - peerAcceptor.setReuseAddress(true); - - peerAcceptor.setHandler(peerIoHandler); - - // TODO: selection of codec factory - // - ProtocolCodecFactory codec = new ObjectSerializationCodecFactory(); - - // handles messages to/from bytes - // - peerAcceptor.getFilterChain().addLast( - "ProtocolCodecFilter", new ProtocolCodecFilter(codec)); - - peerAcceptor.getFilterChain().addLast( - "LoggingFilter", new LoggingFilter()); - - // handles request/response pairs - // - peerAcceptor.getFilterChain().addLast( - "RequestResponseFilter", new RequestResponseFilter()); - - // tracks peers interests and transforms messages to meet those - // requirements - // - peerAcceptor.getFilterChain().addLast( - "InterestManagementFilter", new InterestManagementFilter(this)); - - peerConnectionInfo = - new InetSocketAddress( - host == null ? InetAddress.getLocalHost() : - InetAddress.getByName(host), - port == null ? 0 : Integer.parseInt(port)); - - log.info("binding to {}", peerConnectionInfo); - - peerAcceptor.setLocalAddress(peerConnectionInfo); - - peerAcceptor.bind(); - - peerConnectionInfo = peerAcceptor.getLocalAddress(); - - log.info("bound to {}", peerConnectionInfo); - } - catch (NumberFormatException nfe) - { - throw new RTIinternalError(String.format( - "invalid port: %s", port), nfe); - } - catch (UnknownHostException uhe) - { - throw new RTIinternalError(String.format( - "unknown host: %s", host), uhe); - } - catch (IOException ioe) - { - throw new RTIinternalError("unable to bind acceptor to: %s", ioe); - } - } - } - protected void checkIfSaveInProgress() throws SaveInProgress { @@ -3488,199 +3361,6 @@ } } - protected class PeerIoHandler - extends IoHandlerAdapter - { - public void sessionClosed(IoSession session) - throws Exception - { - peersLock.lock(); - try - { - throw new RuntimeException(); - } - finally - { - peersLock.unlock(); - } - } - - public void messageReceived(IoSession session, Object message) - throws Exception - { - FederateHandle peerFederateHandle = getPeerFederateHandle(session); - if (peerFederateHandle == null) - { - assert message instanceof FederateJoined : - String.format("unexpected message: %s", message); - - FederateJoined federateJoined = (FederateJoined) message; - - session.setAttribute(PEER_FEDERATE_HANDLE, - federateJoined.getFederateHandle()); - peersLock.lock(); - try - { - peerSessions.put(federateJoined.getFederateHandle(), session); - } - finally - { - peersLock.unlock(); - } - - objectManager.federateJoined(session); - - session.write(new DefaultResponse(federateJoined.getId())); - } - else if (message instanceof ReflectAttributeValues) - { - ReflectAttributeValues reflectAttributeValues = - (ReflectAttributeValues) message; - - timeManager.getTimeLock().readLock().lock(); - try - { - OrderType receivedOrderType = - reflectAttributeValues.getSentOrderType() == OrderType.TIMESTAMP && - timeManager.isTimeConstrained() ? OrderType.TIMESTAMP : - OrderType.RECEIVE; - reflectAttributeValues.setReceivedOrderType(receivedOrderType); - - if (receivedOrderType == OrderType.RECEIVE) - { - // receive order callbacks need to be held until released if we are - // constrained and in the time granted state if asynchronous delivery is - // disabled - // - boolean hold = timeManager.isTimeConstrainedAndTimeGranted() && - !isAsynchronousDeliveryEnabled(); - - callbackManager.add(reflectAttributeValues, hold); - } - else - { - // schedule the callback for the appropriate time - // - Future future = schedule( - reflectAttributeValues.getUpdateTime(), - new AddCallback(reflectAttributeValues)); - - // register the message retraction handle - // - messageRetractionManager.add( - reflectAttributeValues.getUpdateTime(), future, - reflectAttributeValues.getMessageRetractionHandle()); - } - } - finally - { - timeManager.getTimeLock().readLock().unlock(); - } - } - else if (message instanceof ReceiveInteraction) - { - ReceiveInteraction receiveInteraction = (ReceiveInteraction) message; - - timeManager.getTimeLock().readLock().lock(); - try - { - OrderType receivedOrderType = - receiveInteraction.getSentOrderType() == OrderType.TIMESTAMP && - timeManager.isTimeConstrained() ? OrderType.TIMESTAMP : - OrderType.RECEIVE; - - receiveInteraction.setReceivedOrderType(receivedOrderType); - - if (receivedOrderType == OrderType.RECEIVE) - { - // receive order callbacks need to be held until released if we are - // constrained and in the time granted state, if asynchronous delivery is - // disabled - // - boolean hold = timeManager.isTimeConstrainedAndTimeGranted() && - !isAsynchronousDeliveryEnabled(); - - callbackManager.add(receiveInteraction, hold); - } - else - { - // schedule the callback for the appropriate time - // - Future future = schedule(receiveInteraction.getSendTime(), - new AddCallback(receiveInteraction)); - - // register the message retraction handle - // - messageRetractionManager.add( - receiveInteraction.getSendTime(), future, - receiveInteraction.getMessageRetractionHandle()); - } - } - finally - { - timeManager.getTimeLock().readLock().unlock(); - } - } - else if (message instanceof FederateSaveInitiated) - { - FederateSaveInitiated federateSaveInitiated = - (FederateSaveInitiated) message; - federateStateLock.writeLock().lock(); - try - { - if (federateSave == null) - { - // handle the case where the message from the federation execution - // has not arrived yet - // - federateSave = new FederateSave( - federateHandle, federateType, - federateSaveInitiated.getParticipants()); - } - - federateSave.federateSaveInitiated(peerFederateHandle); - } - finally - { - federateStateLock.writeLock().unlock(); - } - } - else if (message instanceof FederateSaveInitiatedFailed) - { - FederateSaveInitiatedFailed federateSaveInitiatedFailed = - (FederateSaveInitiatedFailed) message; - federateStateLock.writeLock().lock(); - try - { - if (federateSave == null) - { - // handle the case where the message from the federation execution - // has not arrived yet - // - federateSave = new FederateSave( - federateHandle, federateType, - federateSaveInitiatedFailed.getParticipants()); - } - - federateSave.federateSaveInitiatedFailed(peerFederateHandle); - } - finally - { - federateStateLock.writeLock().unlock(); - } - } - else - { - assert false : String.format("unexpected message: %s", message); - } - } - - protected FederateHandle getPeerFederateHandle(IoSession session) - { - return (FederateHandle) session.getAttribute(PEER_FEDERATE_HANDLE); - } - } - protected class FederateAmbassadorInterceptor extends NullFederateAmbassador { @@ -3759,21 +3439,7 @@ try { federateAmbassador.initiateFederateSave(label); - - FederateSaveInitiated federateSaveInitiated = - new FederateSaveInitiated(federateSave.getParticipants()); - - rtiSession.write(federateSaveInitiated); - sendToPeers(federateSaveInitiated); } - catch (Throwable t) - { - FederateSaveInitiatedFailed federateSaveInitiatedFailed = - new FederateSaveInitiatedFailed(t, federateSave.getParticipants()); - - rtiSession.write(federateSaveInitiatedFailed); - sendToPeers(federateSaveInitiatedFailed); - } finally { federateState = FederateState.SAVE_IN_PROGRESS; @@ -3795,21 +3461,7 @@ try { federateAmbassador.initiateFederateSave(label, saveTime); - - FederateSaveInitiated federateSaveInitiated = - new FederateSaveInitiated(federateSave.getParticipants()); - - rtiSession.write(federateSaveInitiated); - sendToPeers(federateSaveInitiated); } - catch (Throwable t) - { - FederateSaveInitiatedFailed federateSaveInitiatedFailed = - new FederateSaveInitiatedFailed(t, federateSave.getParticipants()); - - rtiSession.write(federateSaveInitiatedFailed); - sendToPeers(federateSaveInitiatedFailed); - } finally { federateState = FederateState.SAVE_IN_PROGRESS; Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federate/FederateSave.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/FederateSave.java 2007-01-30 01:52:49 UTC (rev 95) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federate/FederateSave.java 2007-01-30 01:53:57 UTC (rev 96) @@ -16,8 +16,6 @@ package net.sf.ohla.rti1516.federate; -import java.util.Set; - import hla.rti1516.FederateHandle; public class FederateSave @@ -25,14 +23,10 @@ protected FederateHandle federateHandle; protected String federateType; - protected transient Set<FederateHandle> participants; - - public FederateSave(FederateHandle federateHandle, String federateType, - Set<FederateHandle> participants) + public FederateSave(FederateHandle federateHandle, String federateType) { this.federateHandle = federateHandle; this.federateType = federateType; - this.participants = participants; } public FederateHandle getFederateHandle() @@ -44,27 +38,4 @@ { return federateType; } - - public Set<FederateHandle> getParticipants() - { - return participants; - } - - public boolean federateSaveInitiated(FederateHandle peerFederateHandle) - { - participants.remove(federateHandle); - return participants.isEmpty(); - } - - public boolean federateSaveInitiatedFailed(FederateHandle peerFederateHandle) - { - participants.remove(federateHandle); - return participants.isEmpty(); - } - - public boolean federateResigned(FederateHandle federateHandle) - { - participants.remove(federateHandle); - return participants.isEmpty(); - } } Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federate/objects/ObjectInstance.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/objects/ObjectInstance.java 2007-01-30 01:52:49 UTC (rev 95) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federate/objects/ObjectInstance.java 2007-01-30 01:53:57 UTC (rev 96) @@ -29,7 +29,7 @@ import net.sf.ohla.rti1516.fdd.Attribute; import net.sf.ohla.rti1516.fdd.ObjectClass; import net.sf.ohla.rti1516.federate.Federate; -import net.sf.ohla.rti1516.federate.callbacks.ReflectAttributeValues; +import net.sf.ohla.rti1516.messages.callbacks.ReflectAttributeValues; import net.sf.ohla.rti1516.OHLAAttributeHandleSet; import net.sf.ohla.rti1516.OHLARegionHandleSet; import net.sf.ohla.rti1516.messages.AttributeOwnershipAcquisition; Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federate/objects/ObjectManager.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/objects/ObjectManager.java 2007-01-30 01:52:49 UTC (rev 95) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federate/objects/ObjectManager.java 2007-01-30 01:53:57 UTC (rev 96) @@ -18,10 +18,9 @@ import net.sf.ohla.rti1516.fdd.ObjectClass; import net.sf.ohla.rti1516.federate.Federate; import net.sf.ohla.rti1516.federate.SubscriptionManager; -import net.sf.ohla.rti1516.federate.callbacks.ReceiveInteraction; -import net.sf.ohla.rti1516.federate.callbacks.RemoveObjectInstance; +import net.sf.ohla.rti1516.messages.callbacks.ReceiveInteraction; +import net.sf.ohla.rti1516.messages.callbacks.RemoveObjectInstance; import net.sf.ohla.rti1516.messages.DefaultResponse; -import net.sf.ohla.rti1516.messages.ObjectInstanceRegistered; import net.sf.ohla.rti1516.messages.RegisterObjectInstance; import net.sf.ohla.rti1516.messages.ReserveObjectInstanceName; import net.sf.ohla.rti1516.messages.ResignFederationExecution; @@ -605,12 +604,9 @@ // Object response = registerObjectInstance.getResponse(); - assert response instanceof ObjectInstanceRegistered : - String.format("unexpected response: %s"); +// assert response instanceof ObjectInstanceRegistered : +// String.format("unexpected response: %s"); - ObjectInstanceRegistered objectInstanceRegistered = - (ObjectInstanceRegistered) response; - ObjectInstanceHandle objectInstanceHandle = objectInstanceRegistered.getObjectInstanceHandle(); String name = String.format("HLA-%s", objectInstanceHandle); @@ -704,12 +700,9 @@ // Object response = registerObjectInstance.getResponse(); - assert response instanceof ObjectInstanceRegistered : - String.format("unexpected response: %s"); +// assert response instanceof ObjectInstanceRegistered : +// String.format("unexpected response: %s"); - ObjectInstanceRegistered objectInstanceRegistered = - (ObjectInstanceRegistered) response; - ObjectInstanceHandle objectInstanceHandle = objectInstanceRegistered.getObjectInstanceHandle(); Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federate/time/TimeManager.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/time/TimeManager.java 2007-01-30 01:52:49 UTC (rev 95) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federate/time/TimeManager.java 2007-01-30 01:53:57 UTC (rev 96) @@ -20,7 +20,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock; import net.sf.ohla.rti1516.federate.Federate; -import net.sf.ohla.rti1516.federate.callbacks.TimeAdvanceGrant; +import net.sf.ohla.rti1516.messages.callbacks.TimeAdvanceGrant; import net.sf.ohla.rti1516.messages.DisableTimeConstrained; import net.sf.ohla.rti1516.messages.DisableTimeRegulation; import net.sf.ohla.rti1516.messages.EnableTimeConstrained; Added: trunk/rti/src/java/net/sf/ohla/rti1516/federation/Federate.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federation/Federate.java (rev 0) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/Federate.java 2007-01-30 01:53:57 UTC (rev 96) @@ -0,0 +1,206 @@ +/* + * Copyright (c) 2007, Michael Newcomb + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package net.sf.ohla.rti1516.federation; + +import net.sf.ohla.rti1516.messages.callbacks.InitiateFederateSave; +import net.sf.ohla.rti1516.messages.callbacks.FederationSaved; +import net.sf.ohla.rti1516.messages.callbacks.FederationNotSaved; +import net.sf.ohla.rti1516.messages.callbacks.DiscoverObjectInstance; +import net.sf.ohla.rti1516.messages.callbacks.ReflectAttributeValues; +import net.sf.ohla.rti1516.messages.callbacks.ReceiveInteraction; +import net.sf.ohla.rti1516.messages.callbacks.RemoveObjectInstance; +import net.sf.ohla.rti1516.messages.FederateSaveInitiated; +import net.sf.ohla.rti1516.messages.FederateSaveInitiatedFailed; +import net.sf.ohla.rti1516.messages.FederateSaveBegun; +import net.sf.ohla.rti1516.messages.FederateSaveComplete; +import net.sf.ohla.rti1516.messages.FederateSaveNotComplete; +import net.sf.ohla.rti1516.messages.FederateRestoreComplete; +import net.sf.ohla.rti1516.messages.FederateRestoreNotComplete; +import net.sf.ohla.rti1516.messages.RequestAttributeValueUpdate; +import net.sf.ohla.rti1516.messages.Retract; + +import org.apache.mina.common.IoSession; + +import hla.rti1516.FederateHandle; +import hla.rti1516.RestoreStatus; +import hla.rti1516.SaveStatus; + +public class Federate +{ + private static final String FEDERATE_IO_FILTER = "FederateIoFilter"; + + protected final FederateHandle federateHandle; + protected final String federateType; + protected final IoSession session; + protected final FederationExecution federationExecution; + + protected SaveStatus saveStatus = SaveStatus.NO_SAVE_IN_PROGRESS; + protected RestoreStatus restoreStatus = RestoreStatus.NO_RESTORE_IN_PROGRESS; + + public Federate(FederateHandle federateHandle, String federateType, + IoSession session, FederationExecution federationExecution) + { + this.federateHandle = federateHandle; + this.federateType = federateType; + this.session = session; + this.federationExecution = federationExecution; + + session.getFilterChain().addLast( + FEDERATE_IO_FILTER, new FederateIoFilter(this, federationExecution)); + } + + public FederateHandle getFederateHandle() + { + return federateHandle; + } + + public String getFederateType() + { + return federateType; + } + + public IoSession getSession() + { + return session; + } + + public SaveStatus getSaveStatus() + { + return saveStatus; + } + + public RestoreStatus getRestoreStatus() + { + return restoreStatus; + } + + public void resign() + { + session.getFilterChain().remove(FEDERATE_IO_FILTER); + } + + public void initiateFederateSave(InitiateFederateSave initiateFederateSave) + { + saveStatus = SaveStatus.FEDERATE_INSTRUCTED_TO_SAVE; + + session.write(initiateFederateSave); + } + + public void federateSaveInitiated(FederateSaveInitiated federateSaveInitiated) + { + } + + public void federateSaveInitiatedFailed( + FederateSaveInitiatedFailed federateSaveInitiatedFailed) + { + saveStatus = SaveStatus.NO_SAVE_IN_PROGRESS; + } + + public void federateSaveBegun(FederateSaveBegun federateSaveBegun) + { + saveStatus = SaveStatus.FEDERATE_SAVING; + } + + public void federateSaveComplete(FederateSaveComplete federateSaveComplete) + { + saveStatus = SaveStatus.FEDERATE_WAITING_FOR_FEDERATION_TO_SAVE; + } + + public void federateSaveNotComplete( + FederateSaveNotComplete federateSaveNotComplete) + { + saveStatus = SaveStatus.FEDERATE_WAITING_FOR_FEDERATION_TO_SAVE; + } + + public void federationSaved(FederationSaved federationSaved) + { + saveStatus = SaveStatus.NO_SAVE_IN_PROGRESS; + + session.write(federationSaved); + } + + public void federationNotSaved(FederationNotSaved federationNotSaved) + { + saveStatus = SaveStatus.NO_SAVE_IN_PROGRESS; + + session.write(federationNotSaved); + } + + public void federateRestoreComplete( + FederateRestoreComplete federateRestoreComplete) + { + restoreStatus = RestoreStatus.NO_RESTORE_IN_PROGRESS; + } + + public void federateRestoreNotComplete( + FederateRestoreNotComplete federateRestoreNotComplete) + { + restoreStatus = RestoreStatus.NO_RESTORE_IN_PROGRESS; + } + + public void discoverObjectInstance( + DiscoverObjectInstance discoverObjectInstance) + { + session.write(discoverObjectInstance); + } + + public void reflectAttributeValues( + ReflectAttributeValues reflectAttributeValues) + { + session.write(reflectAttributeValues); + } + + public void receiveInteraction(ReceiveInteraction receiveInteraction) + { + session.write(receiveInteraction); + } + + public void removeObjectInstance(RemoveObjectInstance removeObjectInstance) + { + session.write(removeObjectInstance); + } + + public void requestAttributeValueUpdate( + RequestAttributeValueUpdate requestAttributeValueUpdate) + { + session.write(requestAttributeValueUpdate); + } + + public void retract(Retract retract) + { + session.write(retract); + } + + @Override + public int hashCode() + { + return federateHandle.hashCode(); + } + + @Override + public boolean equals(Object rhs) + { + return federateHandle.equals(rhs); + } + + @Override + public String toString() + { + return String.format("%s - %s - %s", federateHandle, + session.getLocalAddress(), federateType); + } +} Added: trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederateIoFilter.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederateIoFilter.java (rev 0) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederateIoFilter.java 2007-01-30 01:53:57 UTC (rev 96) @@ -0,0 +1,517 @@ +/* + * Copyright (c) 2007, Michael Newcomb + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package net.sf.ohla.rti1516.federation; + +import java.util.Map; + +import net.sf.ohla.rti1516.OHLAAttributeHandleValueMap; +import net.sf.ohla.rti1516.OHLAParameterHandleValueMap; +import net.sf.ohla.rti1516.fdd.InteractionClass; +import net.sf.ohla.rti1516.fdd.ObjectClass; +import net.sf.ohla.rti1516.federate.SubscriptionManager; +import net.sf.ohla.rti1516.messages.callbacks.ReceiveInteraction; +import net.sf.ohla.rti1516.messages.callbacks.ReflectAttributeValues; +import net.sf.ohla.rti1516.messages.AttributeOwnershipAcquisition; +import net.sf.ohla.rti1516.messages.AttributeOwnershipAcquisitionIfAvailable; +import net.sf.ohla.rti1516.messages.AttributeOwnershipDivestitureIfWanted; +import net.sf.ohla.rti1516.messages.CancelAttributeOwnershipAcquisition; +import net.sf.ohla.rti1516.messages.CancelNegotiatedAttributeOwnershipDivestiture; +import net.sf.ohla.rti1516.messages.CommitRegionModifications; +import net.sf.ohla.rti1516.messages.ConfirmDivestiture; +import net.sf.ohla.rti1516.messages.CreateRegion; +import net.sf.ohla.rti1516.messages.DeleteRegion; +import net.sf.ohla.rti1516.messages.DisableTimeConstrained; +import net.sf.ohla.rti1516.messages.DisableTimeRegulation; +import net.sf.ohla.rti1516.messages.EnableTimeConstrained; +import net.sf.ohla.rti1516.messages.EnableTimeRegulation; +import net.sf.ohla.rti1516.messages.FederateRestoreComplete; +import net.sf.ohla.rti1516.messages.FederateRestoreNotComplete; +import net.sf.ohla.rti1516.messages.FederateSaveBegun; +import net.sf.ohla.rti1516.messages.FederateSaveComplete; +import net.sf.ohla.rti1516.messages.FederateSaveInitiated; +import net.sf.ohla.rti1516.messages.FederateSaveInitiatedFailed; +import net.sf.ohla.rti1516.messages.FederateSaveNotComplete; +import net.sf.ohla.rti1516.messages.GetRangeBounds; +import net.sf.ohla.rti1516.messages.NegotiatedAttributeOwnershipDivestiture; +import net.sf.ohla.rti1516.messages.QueryAttributeOwnership; +import net.sf.ohla.rti1516.messages.QueryFederationRestoreStatus; +import net.sf.ohla.rti1516.messages.QueryFederationSaveStatus; +import net.sf.ohla.rti1516.messages.RegisterFederationSynchronizationPoint; +import net.sf.ohla.rti1516.messages.RegisterObjectInstance; +import net.sf.ohla.rti1516.messages.RequestAttributeValueUpdate; +import net.sf.ohla.rti1516.messages.RequestFederationRestore; +import net.sf.ohla.rti1516.messages.RequestFederationSave; +import net.sf.ohla.rti1516.messages.ReserveObjectInstanceName; +import net.sf.ohla.rti1516.messages.ResignFederationExecution; +import net.sf.ohla.rti1516.messages.Retract; +import net.sf.ohla.rti1516.messages.SubscribeInteractionClass; +import net.sf.ohla.rti1516.messages.SubscribeObjectClassAttributes; +import net.sf.ohla.rti1516.messages.SynchronizationPointAchieved; +import net.sf.ohla.rti1516.messages.TimeAdvanceRequest; +import net.sf.ohla.rti1516.messages.TimeAdvanceRequestAvailable; +import net.sf.ohla.rti1516.messages.UnconditionalAttributeOwnershipDivestiture; +import net.sf.ohla.rti1516.messages.UnsubscribeInteractionClass; +import net.sf.ohla.rti1516.messages.UnsubscribeObjectClassAttributes; + +import org.apache.mina.common.IoFilterAdapter; +import org.apache.mina.common.IoSession; + +import hla.rti1516.AttributeHandle; +import hla.rti1516.AttributeHandleValueMap; +import hla.rti1516.InteractionClassHandle; +import hla.rti1516.ObjectClassHandle; +import hla.rti1516.ObjectInstanceHandle; +import hla.rti1516.ParameterHandleValueMap; + +public class FederateIoFilter + extends IoFilterAdapter +{ + protected final Federate federate; + protected final FederationExecution federationExecution; + + protected final FederateIoFilterSubscriptionManager subscriptionManager = + new FederateIoFilterSubscriptionManager(); + + public FederateIoFilter(Federate federate, + FederationExecution federationExecution) + { + this.federate = federate; + this.federationExecution = federationExecution; + } + + @Override + public void sessionClosed(NextFilter nextFilter, IoSession session) + throws Exception + { + super.sessionClosed(nextFilter, session); + } + + @Override + public void messageReceived(NextFilter nextFilter, IoSession session, + Object message) + throws Exception + { + if (message instanceof RegisterObjectInstance) + { + federationExecution.registerObjectInstance( + federate, (RegisterObjectInstance) message); + } + else if (message instanceof ReserveObjectInstanceName) + { + federationExecution.reserveObjectInstanceName( + federate, (ReserveObjectInstanceName) message); + } + else if (message instanceof DeleteObjectInstance) + { + federationExecution.deleteObjectInstance( + federate, (DeleteObjectInstance) message); + } + else if (message instanceof RequestAttributeValueUpdate) + { + federationExecution.requestAttributeValueUpdate( + federate, (RequestAttributeValueUpdate) message); + } + else if (message instanceof Retract) + { + federationExecution.retract(federate, (Retract) message); + } + else if (message instanceof SubscribeObjectClassAttributes) + { + SubscribeObjectClassAttributes subscribeObjectClassAttributes = + (SubscribeObjectClassAttributes) message; + + if (subscribeObjectClassAttributes.getAttributeHandles() != null) + { + subscriptionManager.subscribeObjectClassAttributes( + subscribeObjectClassAttributes.getObjectClassHandle(), + subscribeObjectClassAttributes.getAttributeHandles(), + subscribeObjectClassAttributes.isPassive()); + + // TODO: notify the PublicationManager that subsciption interests have changed + } + else if (subscribeObjectClassAttributes.getAttributesAndRegions() != null) + { + subscriptionManager.subscribeObjectClassAttributes( + subscribeObjectClassAttributes.getObjectClassHandle(), + subscribeObjectClassAttributes.getAttributesAndRegions(), + subscribeObjectClassAttributes.isPassive()); + + // TODO: notify the PublicationManager that subsciption interests have changed + } + } + else if (message instanceof UnsubscribeObjectClassAttributes) + { + UnsubscribeObjectClassAttributes unsubscribeObjectClassAttributes = + (UnsubscribeObjectClassAttributes) message; + + if (unsubscribeObjectClassAttributes.getAttributeHandles() != null) + { + subscriptionManager.unsubscribeObjectClassAttributes( + unsubscribeObjectClassAttributes.getObjectClassHandle(), + unsubscribeObjectClassAttributes.getAttributeHandles()); + + // TODO: notify the PublicationManager that subsciption interests have changed + } + else + if (unsubscribeObjectClassAttributes.getAttributesAndRegions() != null) + { + subscriptionManager.unsubscribeObjectClassAttributes( + unsubscribeObjectClassAttributes.getObjectClassHandle(), + unsubscribeObjectClassAttributes.getAttributesAndRegions()); + + // TODO: notify the PublicationManager that subsciption interests have changed + } + } + else if (message instanceof SubscribeInteractionClass) + { + SubscribeInteractionClass subscribeInteractionClass = + (SubscribeInteractionClass) message; + + if (subscribeInteractionClass.getRegionHandles() == null) + { + subscriptionManager.subscribeInteractionClass( + subscribeInteractionClass.getInteractionClassHandle(), + subscribeInteractionClass.isPassive()); + + // TODO: notify the PublicationManager that subsciption interests have changed + } + else + { + subscriptionManager.subscribeInteractionClass( + subscribeInteractionClass.getInteractionClassHandle(), + subscribeInteractionClass.getRegionHandles(), + subscribeInteractionClass.isPassive()); + + // TODO: notify the PublicationManager that subsciption interests have changed + } + } + else if (message instanceof UnsubscribeInteractionClass) + { + UnsubscribeInteractionClass unsubscribeInteractionClass = + (UnsubscribeInteractionClass) message; + + if (unsubscribeInteractionClass.getRegionHandles() == null) + { + subscriptionManager.unsubscribeInteractionClass( + unsubscribeInteractionClass.getInteractionClassHandle()); + + // TODO: notify the PublicationManager that subsciption interests have changed + } + else + { + subscriptionManager.unsubscribeInteractionClass( + unsubscribeInteractionClass.getInteractionClassHandle(), + unsubscribeInteractionClass.getRegionHandles()); + + // TODO: notify the PublicationManager that subsciption interests have changed + } + } + else if (message instanceof RegisterFederationSynchronizationPoint) + { + federationExecution.registerFederationSynchronizationPoint( + federate, (RegisterFederationSynchronizationPoint) message); + } + else if (message instanceof SynchronizationPointAchieved) + { + federationExecution.synchronizationPointAchieved( + federate, (SynchronizationPointAchieved) message); + } + else if (message instanceof RequestFederationSave) + { + federationExecution.requestFederationSave( + federate, (RequestFederationSave) message); + } + else if (message instanceof FederateSaveInitiated) + { + federationExecution.federateSaveInitiated( + federate, (FederateSaveInitiated) message); + } + else if (message instanceof FederateSaveInitiatedFailed) + { + federationExecution.federateSaveInitiatedFailed( + federate, (FederateSaveInitiatedFailed) message); + } + else if (message instanceof FederateSaveBegun) + { + federationExecution.federateSaveBegun( + federate, (FederateSaveBegun)... [truncated message content] |
From: <mne...@us...> - 2007-01-30 01:52:49
|
Revision: 95 http://svn.sourceforge.net/ohla/?rev=95&view=rev Author: mnewcomb Date: 2007-01-29 17:52:49 -0800 (Mon, 29 Jan 2007) Log Message: ----------- moved functionality to objects package Removed Paths: ------------- trunk/rti/src/java/net/sf/ohla/rti1516/federation/ownership/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mne...@us...> - 2007-01-30 01:52:06
|
Revision: 94 http://svn.sourceforge.net/ohla/?rev=94&view=rev Author: mnewcomb Date: 2007-01-29 17:52:06 -0800 (Mon, 29 Jan 2007) Log Message: ----------- refactored to messages Removed Paths: ------------- trunk/rti/src/java/net/sf/ohla/rti1516/federate/callbacks/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mne...@us...> - 2007-01-30 01:51:20
|
Revision: 93 http://svn.sourceforge.net/ohla/?rev=93&view=rev Author: mnewcomb Date: 2007-01-29 17:51:20 -0800 (Mon, 29 Jan 2007) Log Message: ----------- moved filtering to central RTI Removed Paths: ------------- trunk/rti/src/java/net/sf/ohla/rti1516/federate/filter/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mne...@us...> - 2007-01-19 18:41:49
|
Revision: 92 http://svn.sourceforge.net/ohla/?rev=92&view=rev Author: mnewcomb Date: 2007-01-19 10:41:46 -0800 (Fri, 19 Jan 2007) Log Message: ----------- removed duplicate text from thrown exceptions Modified Paths: -------------- trunk/rti/src/java/net/sf/ohla/rti1516/RTI.java Modified: trunk/rti/src/java/net/sf/ohla/rti1516/RTI.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/RTI.java 2007-01-19 18:32:23 UTC (rev 91) +++ trunk/rti/src/java/net/sf/ohla/rti1516/RTI.java 2007-01-19 18:41:46 UTC (rev 92) @@ -137,9 +137,8 @@ log.info("federation execution already exists: {}", federationExecutionName); - response = new FederationExecutionAlreadyExists( - String.format("federation execution already exists: %s", - federationExecutionName)); + response = + new FederationExecutionAlreadyExists(federationExecutionName); } else { @@ -179,9 +178,7 @@ log.info("federation execution does not exist: {}", federationExecutionName); - response = new FederationExecutionDoesNotExist( - String.format("federation execution does not exist: %s", - federationExecutionName)); + response = new FederationExecutionDoesNotExist(federationExecutionName); } else { @@ -229,11 +226,9 @@ log.info("federation execution does not exist: {}", federationExecutionName); - Object response = new FederationExecutionDoesNotExist( - String.format("federation execution does not exist: %s", - federationExecutionName)); session.write(new DefaultResponse( - joinFederationExecution.getId(), response)); + joinFederationExecution.getId(), + new FederationExecutionDoesNotExist(federationExecutionName))); } } finally This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mne...@us...> - 2007-01-19 18:32:24
|
Revision: 91 http://svn.sourceforge.net/ohla/?rev=91&view=rev Author: mnewcomb Date: 2007-01-19 10:32:23 -0800 (Fri, 19 Jan 2007) Log Message: ----------- - fix for removed statics from RTI.java Modified Paths: -------------- trunk/rti/src/java/net/sf/ohla/rti1516/OHLARTIambassador.java Modified: trunk/rti/src/java/net/sf/ohla/rti1516/OHLARTIambassador.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/OHLARTIambassador.java 2007-01-19 18:24:44 UTC (rev 90) +++ trunk/rti/src/java/net/sf/ohla/rti1516/OHLARTIambassador.java 2007-01-19 18:32:23 UTC (rev 91) @@ -2913,9 +2913,9 @@ if (rtiSession == null || !rtiSession.isConnected()) { String host = - System.getProperties().getProperty(RTI.OHLA_RTI_HOST_PROPERTY); + System.getProperties().getProperty("ohla.rti.host"); String port = - System.getProperties().getProperty(RTI.OHLA_RTI_PORT_PROPERTY); + System.getProperties().getProperty("ohla.rti.port"); try { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mne...@us...> - 2007-01-19 18:24:49
|
Revision: 90 http://svn.sourceforge.net/ohla/?rev=90&view=rev Author: mnewcomb Date: 2007-01-19 10:24:44 -0800 (Fri, 19 Jan 2007) Log Message: ----------- - refactored some method names Modified Paths: -------------- trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java 2007-01-19 15:19:29 UTC (rev 89) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java 2007-01-19 18:24:44 UTC (rev 90) @@ -214,163 +214,176 @@ if (message instanceof RegisterObjectInstance) { - process(session, (RegisterObjectInstance) message); + registerObjectInstance(session, (RegisterObjectInstance) message); } else if (message instanceof ReserveObjectInstanceName) { - process(session, (ReserveObjectInstanceName) message); + reserveObjectInstanceName(session, (ReserveObjectInstanceName) message); } else if (message instanceof RemoveObjectInstance) { - process(session, (RemoveObjectInstance) message); + removeObjectInstance(session, (RemoveObjectInstance) message); } else if (message instanceof RequestAttributeValueUpdate) { - process(session, (RequestAttributeValueUpdate) message); + requestAttributeValueUpdate( + session, (RequestAttributeValueUpdate) message); } else if (message instanceof Retract) { - process(session, (Retract) message); + retract(session, (Retract) message); } else if (message instanceof SubscribeObjectClassAttributes) { - process(session, (SubscribeObjectClassAttributes) message); + subscribeObjectClassAttributes( + session, (SubscribeObjectClassAttributes) message); } else if (message instanceof RegisterFederationSynchronizationPoint) { - process(session, (RegisterFederationSynchronizationPoint) message); + registerFederationSynchronizationPoint( + session, (RegisterFederationSynchronizationPoint) message); } else if (message instanceof SynchronizationPointAchieved) { - process(session, (SynchronizationPointAchieved) message); + synchronizationPointAchieved( + session, (SynchronizationPointAchieved) message); } else if (message instanceof RequestFederationSave) { - process(session, (RequestFederationSave) message); + requestFederationSave(session, (RequestFederationSave) message); } else if (message instanceof FederateSaveInitiated) { - process(session, (FederateSaveInitiated) message); + federateSaveInitiated(session, (FederateSaveInitiated) message); } else if (message instanceof FederateSaveInitiatedFailed) { - process(session, (FederateSaveInitiatedFailed) message); + federateSaveInitiatedFailed( + session, (FederateSaveInitiatedFailed) message); } else if (message instanceof FederateSaveBegun) { - process(session, (FederateSaveBegun) message); + federateSaveBegun(session, (FederateSaveBegun) message); } else if (message instanceof FederateSaveComplete) { - process(session, (FederateSaveComplete) message); + federateSaveComplete(session, (FederateSaveComplete) message); } else if (message instanceof FederateSaveNotComplete) { - process(session, (FederateSaveNotComplete) message); + federateSaveNotComplete(session, (FederateSaveNotComplete) message); } else if (message instanceof QueryFederationSaveStatus) { - process(session, (QueryFederationSaveStatus) message); + queryFederationSaveStatus(session, (QueryFederationSaveStatus) message); } else if (message instanceof RequestFederationRestore) { - process(session, (RequestFederationRestore) message); + requestFederationRestore(session, (RequestFederationRestore) message); } else if (message instanceof FederateRestoreComplete) { - process(session, (FederateRestoreComplete) message); + federateRestoreComplete(session, (FederateRestoreComplete) message); } else if (message instanceof FederateRestoreNotComplete) { - process(session, (FederateRestoreNotComplete) message); + federateRestoreNotComplete(session, (FederateRestoreNotComplete) message); } else if (message instanceof QueryFederationRestoreStatus) { - process(session, (QueryFederationRestoreStatus) message); + queryFederationRestoreStatus(session, (QueryFederationRestoreStatus) message); } else if (message instanceof UnconditionalAttributeOwnershipDivestiture) { - process(session, (UnconditionalAttributeOwnershipDivestiture) message); + unconditionalAttributeOwnershipDivestiture( + session, (UnconditionalAttributeOwnershipDivestiture) message); } else if (message instanceof NegotiatedAttributeOwnershipDivestiture) { - process(session, (NegotiatedAttributeOwnershipDivestiture) message); + negotiatedAttributeOwnershipDivestiture( + session, (NegotiatedAttributeOwnershipDivestiture) message); } else if (message instanceof ConfirmDivestiture) { - process(session, (ConfirmDivestiture) message); + confirmDivestiture(session, (ConfirmDivestiture) message); } else if (message instanceof AttributeOwnershipAcquisition) { - process(session, (AttributeOwnershipAcquisition) message); + attributeOwnershipAcquisition( + session, (AttributeOwnershipAcquisition) message); } else if (message instanceof AttributeOwnershipAcquisitionIfAvailable) { - process(session, (AttributeOwnershipAcquisitionIfAvailable) message); + attributeOwnershipAcquisitionIfAvailable( + session, (AttributeOwnershipAcquisitionIfAvailable) message); } else if (message instanceof AttributeOwnershipDivestitureIfWanted) { - process(session, (AttributeOwnershipDivestitureIfWanted) message); + attributeOwnershipDivestitureIfWanted( + session, (AttributeOwnershipDivestitureIfWanted) message); } else if (message instanceof CancelNegotiatedAttributeOwnershipDivestiture) { - process(session, (CancelNegotiatedAttributeOwnershipDivestiture) message); + cancelNegotiatedAttributeOwnershipDivestiture( + session, (CancelNegotiatedAttributeOwnershipDivestiture) message); } else if (message instanceof CancelAttributeOwnershipAcquisition) { - process(session, (CancelAttributeOwnershipAcquisition) message); + cancelAttributeOwnershipAcquisition( + session, (CancelAttributeOwnershipAcquisition) message); } else if (message instanceof QueryAttributeOwnership) { - process(session, (QueryAttributeOwnership) message); + queryAttributeOwnership(session, (QueryAttributeOwnership) message); } else if (message instanceof EnableTimeRegulation) { - process(session, (EnableTimeRegulation) message); + enableTimeRegulation(session, (EnableTimeRegulation) message); } else if (message instanceof DisableTimeRegulation) { - process(session, (DisableTimeRegulation) message); + disableTimeRegulation(session, (DisableTimeRegulation) message); } else if (message instanceof EnableTimeConstrained) { - process(session, (EnableTimeConstrained) message); + enableTimeConstrained(session, (EnableTimeConstrained) message); } else if (message instanceof DisableTimeConstrained) { - process(session, (DisableTimeConstrained) message); + disableTimeConstrained(session, (DisableTimeConstrained) message); } else if (message instanceof TimeAdvanceRequest) { - process(session, (TimeAdvanceRequest) message); + timeAdvanceRequest(session, (TimeAdvanceRequest) message); } else if (message instanceof TimeAdvanceRequestAvailable) { - process(session, (TimeAdvanceRequestAvailable) message); + timeAdvanceRequestAvailable( + session, (TimeAdvanceRequestAvailable) message); } else if (message instanceof CommitRegionModifications) { - process(session, (CommitRegionModifications) message); + commitRegionModifications(session, (CommitRegionModifications) message); } else if (message instanceof GetRangeBounds) { - process(session, (GetRangeBounds) message); + getRangeBounds(session, (GetRangeBounds) message); } else if (message instanceof CreateRegion) { - process(session, (CreateRegion) message); + createRegion(session, (CreateRegion) message); } else if (message instanceof DeleteRegion) { - process(session, (DeleteRegion) message); + deleteRegion(session, (DeleteRegion) message); } else if (message instanceof JoinFederationExecution) { - process(session, (JoinFederationExecution) message); + joinFederationExecution(session, (JoinFederationExecution) message); } else if (message instanceof ResignFederationExecution) { - process(session, (ResignFederationExecution) message); + resignFederationExecution(session, (ResignFederationExecution) message); } else { @@ -380,7 +393,7 @@ return processed; } - protected void process(IoSession session, + protected void registerObjectInstance(IoSession session, RegisterObjectInstance registerObjectInstance) { boolean unlock = true; @@ -441,7 +454,7 @@ } } - protected void process(IoSession session, + protected void reserveObjectInstanceName(IoSession session, ReserveObjectInstanceName reserveObjectInstanceName) { federationExecutionStateLock.readLock().lock(); @@ -516,7 +529,7 @@ } } - protected void process(IoSession session, + protected void removeObjectInstance(IoSession session, RemoveObjectInstance removeObjectInstance) { federationExecutionStateLock.readLock().lock(); @@ -537,7 +550,7 @@ } } - protected void process( + protected void requestAttributeValueUpdate( IoSession session, RequestAttributeValueUpdate requestAttributeValueUpdate) { federationExecutionStateLock.readLock().lock(); @@ -551,7 +564,7 @@ } } - protected void process(IoSession session, Retract retract) + protected void retract(IoSession session, Retract retract) { federationExecutionStateLock.readLock().lock(); try @@ -564,7 +577,7 @@ } } - protected void process( + protected void subscribeObjectClassAttributes( IoSession session, SubscribeObjectClassAttributes subscribeObjectClassAttributes) { @@ -586,7 +599,7 @@ } } - protected void process( + protected void registerFederationSynchronizationPoint( IoSession session, RegisterFederationSynchronizationPoint registerFederationSynchronizationPoint) { @@ -662,7 +675,7 @@ } } - protected void process( + protected void synchronizationPointAchieved( IoSession session, SynchronizationPointAchieved synchronizationPointAchieved) { @@ -702,7 +715,7 @@ } } - protected void process(IoSession session, + protected void requestFederationSave(IoSession session, RequestFederationSave requestFederationSave) { federationExecutionStateLock.writeLock().lock(); @@ -781,7 +794,7 @@ } } - protected void process(IoSession session, + protected void federateSaveInitiated(IoSession session, FederateSaveInitiated federateSaveInitiated) { federationExecutionStateLock.readLock().lock(); @@ -797,7 +810,7 @@ } } - protected void process( + protected void federateSaveInitiatedFailed( IoSession session, FederateSaveInitiatedFailed federateSaveInitiatedFailed) { federationExecutionStateLock.readLock().lock(); @@ -814,7 +827,7 @@ } } - protected void process(IoSession session, FederateSaveBegun federateSaveBegun) + protected void federateSaveBegun(IoSession session, FederateSaveBegun federateSaveBegun) { federationExecutionStateLock.readLock().lock(); try @@ -833,7 +846,7 @@ } } - protected void process(IoSession session, + protected void federateSaveComplete(IoSession session, FederateSaveComplete federateSaveComplete) { federationExecutionStateLock.readLock().lock(); @@ -889,7 +902,7 @@ } } - protected void process(IoSession session, + protected void federateSaveNotComplete(IoSession session, FederateSaveNotComplete federateSaveNotComplete) { federationExecutionStateLock.readLock().lock(); @@ -946,7 +959,7 @@ } } - protected void process(IoSession session, + protected void queryFederationSaveStatus(IoSession session, QueryFederationSaveStatus queryFederationSaveStatus) { federationExecutionStateLock.readLock().lock(); @@ -984,7 +997,7 @@ } } - protected void process(IoSession session, + protected void requestFederationRestore(IoSession session, RequestFederationRestore requestFederationRestore) { federationExecutionStateLock.readLock().lock(); @@ -1019,7 +1032,7 @@ } } - protected void process(IoSession session, + protected void federateRestoreComplete(IoSession session, FederateRestoreComplete federateRestoreComplete) { federationExecutionStateLock.readLock().lock(); @@ -1039,7 +1052,7 @@ } } - protected void process(IoSession session, + protected void federateRestoreNotComplete(IoSession session, FederateRestoreNotComplete federateRestoreNotComplete) { federationExecutionStateLock.readLock().lock(); @@ -1059,7 +1072,7 @@ } } - protected void process( + protected void queryFederationRestoreStatus( IoSession session, QueryFederationRestoreStatus queryFederationRestoreStatus) { @@ -1099,7 +1112,7 @@ } } - protected void process( + protected void unconditionalAttributeOwnershipDivestiture( IoSession session, UnconditionalAttributeOwnershipDivestiture unconditionalAttributeOwnershipDivestiture) { @@ -1116,7 +1129,7 @@ } } - protected void process( + protected void negotiatedAttributeOwnershipDivestiture( IoSession session, NegotiatedAttributeOwnershipDivestiture negotiatedAttributeOwnershipDivestiture) { @@ -1134,7 +1147,7 @@ } } - protected void process(IoSession session, + protected void confirmDivestiture(IoSession session, ConfirmDivestiture confirmDivestiture) { federationExecutionStateLock.readLock().lock(); @@ -1150,7 +1163,7 @@ } } - protected void process( + protected void attributeOwnershipAcquisition( IoSession session, AttributeOwnershipAcquisition attributeOwnershipAcquisition) { @@ -1169,7 +1182,7 @@ } } - protected void process( + protected void attributeOwnershipAcquisitionIfAvailable( IoSession session, AttributeOwnershipAcquisitionIfAvailable attributeOwnershipAcquisitionIfAvailable) { @@ -1187,7 +1200,7 @@ } } - protected void process( + protected void attributeOwnershipDivestitureIfWanted( IoSession session, AttributeOwnershipDivestitureIfWanted attributeOwnershipDivestitureIfWanted) { @@ -1274,7 +1287,7 @@ } } - protected void process( + protected void cancelNegotiatedAttributeOwnershipDivestiture( IoSession session, CancelNegotiatedAttributeOwnershipDivestiture cancelNegotiatedAttributeOwnershipDivestiture) { @@ -1292,7 +1305,7 @@ } } - protected void process( + protected void cancelAttributeOwnershipAcquisition( IoSession session, CancelAttributeOwnershipAcquisition cancelAttributeOwnershipAcquisition) { @@ -1310,7 +1323,7 @@ } } - protected void process(IoSession session, + protected void queryAttributeOwnership(IoSession session, QueryAttributeOwnership queryAttributeOwnership) { federationExecutionStateLock.readLock().lock(); @@ -1326,7 +1339,7 @@ } } - protected void process(IoSession session, + protected void enableTimeRegulation(IoSession session, EnableTimeRegulation enableTimeRegulation) { federationExecutionStateLock.readLock().lock(); @@ -1341,7 +1354,7 @@ } } - protected void process(IoSession session, + protected void disableTimeRegulation(IoSession session, DisableTimeRegulation disableTimeRegulation) { federationExecutionStateLock.readLock().lock(); @@ -1355,7 +1368,7 @@ } } - protected void process(IoSession session, + protected void enableTimeConstrained(IoSession session, EnableTimeConstrained enableTimeConstrained) { federationExecutionStateLock.readLock().lock(); @@ -1369,7 +1382,7 @@ } } - protected void process(IoSession session, + protected void disableTimeConstrained(IoSession session, DisableTimeConstrained disableTimeConstrained) { federationExecutionStateLock.readLock().lock(); @@ -1383,7 +1396,7 @@ } } - protected void process(IoSession session, + protected void timeAdvanceRequest(IoSession session, TimeAdvanceRequest timeAdvanceRequest) { federationExecutionStateLock.readLock().lock(); @@ -1398,7 +1411,7 @@ } } - protected void process( + protected void timeAdvanceRequestAvailable( IoSession session, TimeAdvanceRequestAvailable timeAdvanceRequestAvailable) { federationExecutionStateLock.readLock().lock(); @@ -1413,7 +1426,7 @@ } } - protected void process(IoSession session, + protected void commitRegionModifications(IoSession session, CommitRegionModifications commitRegionModifications) { federationExecutionStateLock.readLock().lock(); @@ -1441,7 +1454,7 @@ } } - protected void process(IoSession session, GetRangeBounds getRangeBounds) + protected void getRangeBounds(IoSession session, GetRangeBounds getRangeBounds) { federationExecutionStateLock.readLock().lock(); try @@ -1467,7 +1480,7 @@ } } - protected void process(IoSession session, CreateRegion createRegion) + protected void createRegion(IoSession session, CreateRegion createRegion) { federationExecutionStateLock.readLock().lock(); try @@ -1501,7 +1514,7 @@ } } - protected void process(IoSession session, DeleteRegion deleteRegion) + protected void deleteRegion(IoSession session, DeleteRegion deleteRegion) { federationExecutionStateLock.readLock().lock(); try @@ -1524,7 +1537,7 @@ } } - protected void process(IoSession session, + protected void joinFederationExecution(IoSession session, JoinFederationExecution joinFederationExecution) { federationExecutionStateLock.readLock().lock(); @@ -1608,7 +1621,7 @@ } } - protected void process(IoSession session, + protected void resignFederationExecution(IoSession session, ResignFederationExecution resignFederationExecution) { federationExecutionStateLock.readLock().lock(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mne...@us...> - 2007-01-19 15:19:32
|
Revision: 89 http://svn.sourceforge.net/ohla/?rev=89&view=rev Author: mnewcomb Date: 2007-01-19 07:19:29 -0800 (Fri, 19 Jan 2007) Log Message: ----------- - added support for multiple acceptors (multiple network cards) Modified Paths: -------------- trunk/rti/src/java/net/sf/ohla/rti1516/RTI.java Modified: trunk/rti/src/java/net/sf/ohla/rti1516/RTI.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/RTI.java 2007-01-17 19:33:11 UTC (rev 88) +++ trunk/rti/src/java/net/sf/ohla/rti1516/RTI.java 2007-01-19 15:19:29 UTC (rev 89) @@ -4,13 +4,17 @@ import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.SocketAddress; -import java.net.UnknownHostException; +import java.util.HashMap; +import java.util.Map; import java.util.SortedMap; import java.util.TreeMap; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import net.sf.ohla.rti1516.fdd.FDD; import net.sf.ohla.rti1516.federation.FederationExecution; import net.sf.ohla.rti1516.filter.RequestResponseFilter; import net.sf.ohla.rti1516.messages.CreateFederationExecution; @@ -32,7 +36,6 @@ import hla.rti1516.FederatesCurrentlyJoined; import hla.rti1516.FederationExecutionAlreadyExists; import hla.rti1516.FederationExecutionDoesNotExist; -import hla.rti1516.RTIinternalError; public class RTI { @@ -40,98 +43,108 @@ private static final Logger log = LoggerFactory.getLogger(RTI.class); - public static final String OHLA_RTI_HOST_PROPERTY = "ohla.rti.host"; - public static final String OHLA_RTI_PORT_PROPERTY = "ohla.rti.port"; + public static final String OHLA_RTI_ACCEPTOR_PATTERN = + "ohla\\.rti\\.acceptor\\.(\\w)\\.(bind_addr|port|backlog|reuse|codec|log)"; + protected Map<String, SocketAcceptor> socketAcceptors = + new HashMap<String, SocketAcceptor>(); + + protected RTIIoHandler rtiIoHandler = new RTIIoHandler(); + protected Lock federationsLock = new ReentrantLock(true); protected SortedMap<String, FederationExecution> federations = new TreeMap<String, FederationExecution>(); public RTI() - throws RTIinternalError { - String host = System.getProperties().getProperty(OHLA_RTI_HOST_PROPERTY); - String port = System.getProperties().getProperty(OHLA_RTI_PORT_PROPERTY); + Pattern pattern = Pattern.compile(OHLA_RTI_ACCEPTOR_PATTERN); - try + Map<String, SocketAcceptorProfile> socketAcceptorProfiles = + new HashMap<String, SocketAcceptorProfile>(); + + for (Map.Entry entry : System.getProperties().entrySet()) { - SocketAcceptor acceptor = new SocketAcceptor(); + String key = (String) entry.getKey(); + if (key.startsWith("ohla.rti")) + { + String value = (String) entry.getValue(); - acceptor.setReuseAddress(true); + Matcher matcher = pattern.matcher(key); + if (matcher.matches()) + { + String name = matcher.group(1); + String property = matcher.group(2); - acceptor.setHandler(new RTIIoHandler()); + SocketAcceptorProfile socketAcceptorProfile = + socketAcceptorProfiles.get(name); + if (socketAcceptorProfile == null) + { + socketAcceptorProfile = new SocketAcceptorProfile(name); + socketAcceptorProfiles.put(name, socketAcceptorProfile); + } - // TODO: selection of codec factory - // - ProtocolCodecFactory codec = new ObjectSerializationCodecFactory(); + try + { + socketAcceptorProfile.setProperty(property, value); + } + catch (Exception e) + { + log.warn(String.format("invalid property: %s - %s", key, value), e); + } + } + } + } - // handles messages to/from bytes - // - acceptor.getFilterChain().addLast( - "ProtocolCodecFilter", new ProtocolCodecFilter(codec)); + log.debug("creating {} socket acceptor(s)", socketAcceptorProfiles.size()); - acceptor.getFilterChain().addLast("LoggingFilter", new LoggingFilter()); + for (SocketAcceptorProfile socketAcceptorProfile : socketAcceptorProfiles.values()) + { + try + { + socketAcceptors.put(socketAcceptorProfile.getName(), + socketAcceptorProfile.createSocketAcceptor()); + } + catch (Exception e) + { + log.error(String.format( + "unable to create socket acceptor: %s", + socketAcceptorProfile.getName()), e); + } - // handles request/response pairs - // - acceptor.getFilterChain().addLast( - "RequestResponseFilter", new RequestResponseFilter()); - - SocketAddress socketAddress = - new InetSocketAddress(host == null ? null : InetAddress.getByName(host), - port == null ? 0 : Integer.parseInt(port)); - - log.info("binding to {}", socketAddress); - - acceptor.setLocalAddress(socketAddress); - - acceptor.bind(); - - log.info("bound to {}", acceptor.getLocalAddress()); + if (socketAcceptors.isEmpty()) + { + log.error("no socket acceptors configured"); + } } - catch (NumberFormatException nfe) - { - throw new RTIinternalError(String.format("invalid port: %s", port), nfe); - } - catch (UnknownHostException uhe) - { - throw new RTIinternalError(String.format("unknown host: %s", host), uhe); - } - catch (IOException ioe) - { - throw new RTIinternalError("unable to bind acceptor to: %s", ioe); - } } - protected void process(IoSession session, - CreateFederationExecution createFederationExecution) + protected void createFederationExecution( + IoSession session, CreateFederationExecution createFederationExecution) { - log.info("creating federation execution: {}", - createFederationExecution.getFederationExecutionName()); + String federationExecutionName = + createFederationExecution.getFederationExecutionName(); + FDD fdd = createFederationExecution.getFDD(); - Object response; + log.info("creating federation execution: {}", federationExecutionName); + Object response = null; + federationsLock.lock(); try { - if (federations.containsKey( - createFederationExecution.getFederationExecutionName())) + if (federations.containsKey(federationExecutionName)) { log.info("federation execution already exists: {}", - createFederationExecution.getFederationExecutionName()); + federationExecutionName); response = new FederationExecutionAlreadyExists( String.format("federation execution already exists: %s", - createFederationExecution.getFederationExecutionName())); + federationExecutionName)); } else { - federations.put( - createFederationExecution.getFederationExecutionName(), - new FederationExecution( - createFederationExecution.getFederationExecutionName(), - createFederationExecution.getFDD())); - response = null; + federations.put(federationExecutionName, + new FederationExecution(federationExecutionName, fdd)); } } finally @@ -143,44 +156,44 @@ createFederationExecution.getId(), response)); } - protected void process(IoSession session, - DestroyFederationExecution destroyFederationExecution) + protected void destroyFederationExecution( + IoSession session, DestroyFederationExecution destroyFederationExecution) { + String federationExecutionName = + destroyFederationExecution.getFederationExecutionName(); + log.info("destroying federation execution: {}", - destroyFederationExecution.getFederationExecutionName()); + federationExecutionName); - Object response; + Object response = null; federationsLock.lock(); try { // optimistically remove the federation // - FederationExecution federationExecution = federations.remove( - destroyFederationExecution.getFederationExecutionName()); + FederationExecution federationExecution = + federations.remove(federationExecutionName); if (federationExecution == null) { log.info("federation execution does not exist: {}", - destroyFederationExecution.getFederationExecutionName()); + federationExecutionName); response = new FederationExecutionDoesNotExist( String.format("federation execution does not exist: %s", - destroyFederationExecution.getFederationExecutionName())); + federationExecutionName)); } else { try { federationExecution.destroy(); - response = null; } catch (FederatesCurrentlyJoined fcj) { // put it back // - federations.put( - destroyFederationExecution.getFederationExecutionName(), - federationExecution); + federations.put(federationExecutionName, federationExecution); response = fcj; } @@ -195,26 +208,30 @@ destroyFederationExecution.getId(), response)); } - protected void process(IoSession session, - JoinFederationExecution joinFederationExecution) + protected void joinFederationExecution( + IoSession session, JoinFederationExecution joinFederationExecution) { + String federationExecutionName = + joinFederationExecution.getFederationExecutionName(); + federationsLock.lock(); try { - FederationExecution federationExecution = federations.get( - joinFederationExecution.getFederationExecutionName()); + FederationExecution federationExecution = + federations.get(federationExecutionName); if (federationExecution != null) { - federationExecution.process(session, joinFederationExecution); + federationExecution.process( + session, joinFederationExecution); } else { log.info("federation execution does not exist: {}", - joinFederationExecution.getFederationExecutionName()); + federationExecutionName); Object response = new FederationExecutionDoesNotExist( String.format("federation execution does not exist: %s", - joinFederationExecution.getFederationExecutionName())); + federationExecutionName)); session.write(new DefaultResponse( joinFederationExecution.getId(), response)); } @@ -228,12 +245,6 @@ protected class RTIIoHandler extends IoHandlerAdapter { - public void sessionCreated(IoSession session) - throws Exception - { - log.info("CREATED"); - } - public void exceptionCaught(IoSession session, Throwable throwable) throws Exception { @@ -250,19 +261,21 @@ !federationExecution.process(session, message)) { // there was no FederationExecution associated with this channel or - // the one associated could not process the message + // the one associated could not createFederationExecution the message if (message instanceof CreateFederationExecution) { - process(session, (CreateFederationExecution) message); + createFederationExecution( + session, (CreateFederationExecution) message); } else if (message instanceof DestroyFederationExecution) { - process(session, (DestroyFederationExecution) message); + destroyFederationExecution( + session, (DestroyFederationExecution) message); } else if (message instanceof JoinFederationExecution) { - process(session, (JoinFederationExecution) message); + joinFederationExecution(session, (JoinFederationExecution) message); } else { @@ -277,6 +290,197 @@ } } + protected class SocketAcceptorProfile + { + protected final String name; + + protected InetAddress bindAddress; + protected Integer port; + protected Boolean reuseAddress; + protected Integer backlog; + protected Class codec; + protected Boolean logging; + + public SocketAcceptorProfile(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + + public InetAddress getBindAddress() + { + return bindAddress; + } + + public void setBindAddress(InetAddress bindAddress) + { + this.bindAddress = bindAddress; + } + + public Integer getPort() + { + return port; + } + + public void setPort(Integer port) + { + this.port = port; + } + + public Boolean getReuseAddress() + { + return reuseAddress; + } + + public void setReuseAddress(Boolean reuseAddress) + { + this.reuseAddress = reuseAddress; + } + + public Integer getBacklog() + { + return backlog; + } + + public void setBacklog(Integer backlog) + { + this.backlog = backlog; + } + + public Class getCodec() + { + return codec; + } + + public void setCodec(Class codec) + { + this.codec = codec; + } + + public Boolean getLogging() + { + return logging; + } + + public void setLogging(Boolean logging) + { + this.logging = logging; + } + + public void setProperty(String property, String value) + throws Exception + { + if ("bind_addr".equals(property)) + { + setBindAddress(InetAddress.getByName(value)); + } + else if ("port".equals(property)) + { + setPort(Integer.parseInt(value)); + } + else if ("reuse".equals(property)) + { + setReuseAddress(Boolean.valueOf(value)); + } + else if ("backlog".equals(property)) + { + setPort(Integer.parseInt(value)); + } + else if ("codec".equals(property)) + { + setCodec( + Thread.currentThread().getContextClassLoader().loadClass(value)); + } + else if ("log".equals(property)) + { + setLogging(Boolean.valueOf(value)); + } + } + + public SocketAcceptor createSocketAcceptor() + throws Exception + { + SocketAcceptor socketAcceptor = new SocketAcceptor(); + + socketAcceptor.setHandler(rtiIoHandler); + + if (reuseAddress != null) + { + socketAcceptor.setReuseAddress(reuseAddress); + } + + if (backlog != null) + { + socketAcceptor.setBacklog(backlog); + } + + ProtocolCodecFactory protocolCodecFactory; + if (codec != null) + { + try + { + protocolCodecFactory = (ProtocolCodecFactory) codec.newInstance(); + } + catch (InstantiationException ie) + { + log.error("unable to instantiate: {}", codec); + throw ie; + } + catch (IllegalAccessException iae) + { + log.error("illegal access: {}", codec); + throw iae; + } + } + else + { + protocolCodecFactory = new ObjectSerializationCodecFactory(); + } + + // handles messages to/from bytes + // + socketAcceptor.getFilterChain().addLast( + "ProtocolCodecFilter", new ProtocolCodecFilter(protocolCodecFactory)); + + if (Boolean.TRUE.equals(logging)) + { + socketAcceptor.getFilterChain().addLast( + "LoggingFilter", new LoggingFilter()); + } + + // handles request/response pairs + // + socketAcceptor.getFilterChain().addLast( + "RequestResponseFilter", new RequestResponseFilter()); + + SocketAddress socketAddress = + new InetSocketAddress(bindAddress == null ? null : bindAddress, + port == null ? 0 : port); + + log.info("binding to {}", socketAddress); + + socketAcceptor.setLocalAddress(socketAddress); + + try + { + socketAcceptor.bind(); + } + catch (IOException ioe) + { + log.error("unable to bind acceptor to: {}", socketAddress); + throw ioe; + } + + log.info("bound to {}", socketAcceptor.getLocalAddress()); + + return socketAcceptor; + } + } + public static void main(String... args) throws Throwable { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mne...@us...> - 2007-01-17 19:33:20
|
Revision: 88 http://svn.sourceforge.net/ohla/?rev=88&view=rev Author: mnewcomb Date: 2007-01-17 11:33:11 -0800 (Wed, 17 Jan 2007) Log Message: ----------- - adjusted Logger creation - added getters for the name and FDD Modified Paths: -------------- trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java 2007-01-17 19:22:07 UTC (rev 87) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java 2007-01-17 19:33:11 UTC (rev 88) @@ -151,7 +151,7 @@ protected AtomicInteger federateCount = new AtomicInteger(Short.MIN_VALUE); protected AtomicInteger regionCount = new AtomicInteger(Short.MIN_VALUE); - protected Logger log; + protected final Logger log; protected ExecutorService synchronousWaiter = Executors.newSingleThreadExecutor(); @@ -161,10 +161,19 @@ this.name = name; this.fdd = fdd; - log = LoggerFactory.getLogger( - String.format("%s.%s", FederationExecution.class, name)); + log = LoggerFactory.getLogger(String.format("%s.%s", getClass(), name)); } + public String getName() + { + return name; + } + + public FDD getFDD() + { + return fdd; + } + public void destroy() throws FederatesCurrentlyJoined { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mne...@us...> - 2007-01-17 19:22:13
|
Revision: 87 http://svn.sourceforge.net/ohla/?rev=87&view=rev Author: mnewcomb Date: 2007-01-17 11:22:07 -0800 (Wed, 17 Jan 2007) Log Message: ----------- - removed peer notification messages of request attribute update with regions Modified Paths: -------------- trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java 2007-01-17 19:16:34 UTC (rev 86) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java 2007-01-17 19:22:07 UTC (rev 87) @@ -2820,8 +2820,18 @@ { checkIfActive(); - sendToPeers(new RequestAttributeValueUpdate( - objectClassHandle, attributesAndRegions, tag)); + WriteFuture writeFuture = rtiSession.write( + new RequestAttributeValueUpdate( + objectClassHandle, attributesAndRegions, tag)); + + // TODO: set timeout + // + writeFuture.join(); + + if (!writeFuture.isWritten()) + { + throw new RTIinternalError("error communicating with RTI"); + } } finally { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mne...@us...> - 2007-01-17 19:16:37
|
Revision: 86 http://svn.sourceforge.net/ohla/?rev=86&view=rev Author: mnewcomb Date: 2007-01-17 11:16:34 -0800 (Wed, 17 Jan 2007) Log Message: ----------- - removed peer notification messages of retract Modified Paths: -------------- trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java 2007-01-17 19:14:07 UTC (rev 85) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java 2007-01-17 19:16:34 UTC (rev 86) @@ -2342,7 +2342,17 @@ messageRetractionManager.retract(messageRetractionHandle, timeManager.queryLogicalTime()); - sendToPeers(new Retract(messageRetractionHandle)); + WriteFuture writeFuture = rtiSession.write( + new Retract(messageRetractionHandle)); + + // TODO: set timeout + // + writeFuture.join(); + + if (!writeFuture.isWritten()) + { + throw new RTIinternalError("error communicating with RTI"); + } } finally { Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java 2007-01-17 19:14:07 UTC (rev 85) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java 2007-01-17 19:16:34 UTC (rev 86) @@ -82,6 +82,7 @@ import net.sf.ohla.rti1516.messages.GetRangeBounds; import net.sf.ohla.rti1516.messages.TimeAdvanceRequestAvailable; import net.sf.ohla.rti1516.messages.RequestAttributeValueUpdate; +import net.sf.ohla.rti1516.messages.Retract; import org.apache.mina.common.IoSession; import org.apache.mina.common.WriteFuture; @@ -218,6 +219,10 @@ { process(session, (RequestAttributeValueUpdate) message); } + else if (message instanceof Retract) + { + process(session, (Retract) message); + } else if (message instanceof SubscribeObjectClassAttributes) { process(session, (SubscribeObjectClassAttributes) message); @@ -537,6 +542,19 @@ } } + protected void process(IoSession session, Retract retract) + { + federationExecutionStateLock.readLock().lock(); + try + { + send(retract); + } + finally + { + federationExecutionStateLock.readLock().unlock(); + } + } + protected void process( IoSession session, SubscribeObjectClassAttributes subscribeObjectClassAttributes) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mne...@us...> - 2007-01-17 19:14:23
|
Revision: 85 http://svn.sourceforge.net/ohla/?rev=85&view=rev Author: mnewcomb Date: 2007-01-17 11:14:07 -0800 (Wed, 17 Jan 2007) Log Message: ----------- - removed peer notification messages of request attribute value update Modified Paths: -------------- trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java 2007-01-10 15:59:39 UTC (rev 84) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federate/Federate.java 2007-01-17 19:14:07 UTC (rev 85) @@ -1814,8 +1814,18 @@ { checkIfActive(); - sendToPeers(new RequestAttributeValueUpdate( - objectClassHandle, attributeHandles, tag)); + WriteFuture writeFuture = rtiSession.write( + new RequestAttributeValueUpdate( + objectClassHandle, attributeHandles, tag)); + + // TODO: set timeout + // + writeFuture.join(); + + if (!writeFuture.isWritten()) + { + throw new RTIinternalError("error communicating with RTI"); + } } finally { Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java 2007-01-10 15:59:39 UTC (rev 84) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java 2007-01-17 19:14:07 UTC (rev 85) @@ -81,6 +81,7 @@ import net.sf.ohla.rti1516.messages.UnconditionalAttributeOwnershipDivestiture; import net.sf.ohla.rti1516.messages.GetRangeBounds; import net.sf.ohla.rti1516.messages.TimeAdvanceRequestAvailable; +import net.sf.ohla.rti1516.messages.RequestAttributeValueUpdate; import org.apache.mina.common.IoSession; import org.apache.mina.common.WriteFuture; @@ -213,6 +214,10 @@ { process(session, (RemoveObjectInstance) message); } + else if (message instanceof RequestAttributeValueUpdate) + { + process(session, (RequestAttributeValueUpdate) message); + } else if (message instanceof SubscribeObjectClassAttributes) { process(session, (SubscribeObjectClassAttributes) message); @@ -519,6 +524,20 @@ } protected void process( + IoSession session, RequestAttributeValueUpdate requestAttributeValueUpdate) + { + federationExecutionStateLock.readLock().lock(); + try + { + send(requestAttributeValueUpdate); + } + finally + { + federationExecutionStateLock.readLock().unlock(); + } + } + + protected void process( IoSession session, SubscribeObjectClassAttributes subscribeObjectClassAttributes) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mne...@us...> - 2007-01-10 15:59:40
|
Revision: 84 http://svn.sourceforge.net/ohla/?rev=84&view=rev Author: mnewcomb Date: 2007-01-10 07:59:39 -0800 (Wed, 10 Jan 2007) Log Message: ----------- - removed peer notification messages of region creation/modification/deletion Modified Paths: -------------- trunk/rti/src/java/net/sf/ohla/rti1516/federate/RegionManager.java trunk/rti/src/java/net/sf/ohla/rti1516/federate/filter/InterestManagementFilter.java Removed Paths: ------------- trunk/rti/src/java/net/sf/ohla/rti1516/messages/RegionCreated.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/RegionDeleted.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/RegionModificationsCommitted.java Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federate/RegionManager.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/RegionManager.java 2006-12-21 19:25:58 UTC (rev 83) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federate/RegionManager.java 2007-01-10 15:59:39 UTC (rev 84) @@ -11,12 +11,9 @@ import net.sf.ohla.rti1516.OHLARegionHandleSet; import net.sf.ohla.rti1516.fdd.FDD; -import net.sf.ohla.rti1516.messages.CreateRegion; import net.sf.ohla.rti1516.messages.CommitRegionModifications; -import net.sf.ohla.rti1516.messages.RegionCreated; -import net.sf.ohla.rti1516.messages.RegionModificationsCommitted; +import net.sf.ohla.rti1516.messages.CreateRegion; import net.sf.ohla.rti1516.messages.DeleteRegion; -import net.sf.ohla.rti1516.messages.RegionDeleted; import net.sf.ohla.rti1516.messages.GetRangeBounds; import org.apache.mina.common.WriteFuture; @@ -86,8 +83,6 @@ regionsLock.writeLock().unlock(); } - federate.sendToPeers(new RegionCreated(regionHandle, dimensionHandles)); - return regionHandle; } catch (InterruptedException ie) @@ -250,9 +245,6 @@ // TODO: set timeout // commitRegionModifications.await(); - - federate.sendToPeers( - new RegionModificationsCommitted(regionModifications)); } catch (InterruptedException ie) { @@ -298,8 +290,6 @@ deleteRegion.await(); regions.remove(regionHandle); - - federate.sendToPeers(new RegionDeleted(regionHandle)); } catch (InterruptedException ie) { Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federate/filter/InterestManagementFilter.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/filter/InterestManagementFilter.java 2006-12-21 19:25:58 UTC (rev 83) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federate/filter/InterestManagementFilter.java 2007-01-10 15:59:39 UTC (rev 84) @@ -18,21 +18,18 @@ import java.util.Map; +import net.sf.ohla.rti1516.OHLAAttributeHandleValueMap; +import net.sf.ohla.rti1516.OHLAParameterHandleValueMap; import net.sf.ohla.rti1516.fdd.InteractionClass; import net.sf.ohla.rti1516.fdd.ObjectClass; import net.sf.ohla.rti1516.federate.Federate; import net.sf.ohla.rti1516.federate.SubscriptionManager; import net.sf.ohla.rti1516.federate.callbacks.ReceiveInteraction; import net.sf.ohla.rti1516.federate.callbacks.ReflectAttributeValues; -import net.sf.ohla.rti1516.OHLAAttributeHandleValueMap; -import net.sf.ohla.rti1516.OHLAParameterHandleValueMap; import net.sf.ohla.rti1516.messages.SubscribeInteractionClass; import net.sf.ohla.rti1516.messages.SubscribeObjectClassAttributes; import net.sf.ohla.rti1516.messages.UnsubscribeInteractionClass; import net.sf.ohla.rti1516.messages.UnsubscribeObjectClassAttributes; -import net.sf.ohla.rti1516.messages.RegionCreated; -import net.sf.ohla.rti1516.messages.RegionModificationsCommitted; -import net.sf.ohla.rti1516.messages.RegionDeleted; import org.apache.mina.common.IoFilterAdapter; import org.apache.mina.common.IoSession; @@ -159,15 +156,6 @@ // TODO: notify the PublicationManager that subsciption interests have changed } } - else if (message instanceof RegionCreated) - { - } - else if (message instanceof RegionModificationsCommitted) - { - } - else if (message instanceof RegionDeleted) - { - } else { // pass on the message Deleted: trunk/rti/src/java/net/sf/ohla/rti1516/messages/RegionCreated.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/messages/RegionCreated.java 2006-12-21 19:25:58 UTC (rev 83) +++ trunk/rti/src/java/net/sf/ohla/rti1516/messages/RegionCreated.java 2007-01-10 15:59:39 UTC (rev 84) @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2006, Michael Newcomb - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package net.sf.ohla.rti1516.messages; - -import hla.rti1516.DimensionHandleSet; -import hla.rti1516.RegionHandle; - -public class RegionCreated - implements Message -{ - protected RegionHandle regionHandle; - protected DimensionHandleSet dimensionHandles; - - public RegionCreated(RegionHandle regionHandle, - DimensionHandleSet dimensionHandles) - { - this.regionHandle = regionHandle; - this.dimensionHandles = dimensionHandles; - } - - public RegionHandle getRegionHandle() - { - return regionHandle; - } - - public DimensionHandleSet getDimensionHandles() - { - return dimensionHandles; - } -} Deleted: trunk/rti/src/java/net/sf/ohla/rti1516/messages/RegionDeleted.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/messages/RegionDeleted.java 2006-12-21 19:25:58 UTC (rev 83) +++ trunk/rti/src/java/net/sf/ohla/rti1516/messages/RegionDeleted.java 2007-01-10 15:59:39 UTC (rev 84) @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2006, Michael Newcomb - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package net.sf.ohla.rti1516.messages; - -import hla.rti1516.RegionHandle; - -public class RegionDeleted - implements Message -{ - protected RegionHandle regionHandle; - - public RegionDeleted(RegionHandle regionHandle) - { - this.regionHandle = regionHandle; - } - - public RegionHandle getRegionHandle() - { - return regionHandle; - } -} Deleted: trunk/rti/src/java/net/sf/ohla/rti1516/messages/RegionModificationsCommitted.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/messages/RegionModificationsCommitted.java 2006-12-21 19:25:58 UTC (rev 83) +++ trunk/rti/src/java/net/sf/ohla/rti1516/messages/RegionModificationsCommitted.java 2007-01-10 15:59:39 UTC (rev 84) @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2006, Michael Newcomb - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package net.sf.ohla.rti1516.messages; - -import java.util.Map; - -import hla.rti1516.RegionHandle; -import hla.rti1516.DimensionHandle; -import hla.rti1516.RangeBounds; - -public class RegionModificationsCommitted - implements Message -{ - protected Map<RegionHandle, Map<DimensionHandle, RangeBounds>> regionModifications; - - public RegionModificationsCommitted( - Map<RegionHandle, Map<DimensionHandle, RangeBounds>> regionModifications) - { - this.regionModifications = regionModifications; - } - - public Map<RegionHandle, Map<DimensionHandle, RangeBounds>> getRegionModifications() - { - return regionModifications; - } -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mne...@us...> - 2006-12-21 19:25:58
|
Revision: 83 http://svn.sourceforge.net/ohla/?rev=83&view=rev Author: mnewcomb Date: 2006-12-21 11:25:58 -0800 (Thu, 21 Dec 2006) Log Message: ----------- roll back again, changing course Modified Paths: -------------- trunk/build/intellij/OHLA.iws trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java Added Paths: ----------- trunk/rti/src/java/net/sf/ohla/rti1516/federation/ownership/ trunk/rti/src/java/net/sf/ohla/rti1516/federation/ownership/AttributeInstanceOwnership.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/ownership/ObjectInstanceOwnership.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/ownership/OwnershipManager.java Removed Paths: ------------- trunk/rti/src/java/net/sf/ohla/rti1516/federation/objects/ trunk/rti/src/java/net/sf/ohla/rti1516/federation/ownership/AttributeInstanceOwnership.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/ownership/ObjectInstanceOwnership.java trunk/rti/src/java/net/sf/ohla/rti1516/federation/ownership/OwnershipManager.java Modified: trunk/build/intellij/OHLA.iws =================================================================== --- trunk/build/intellij/OHLA.iws 2006-12-21 19:19:58 UTC (rev 82) +++ trunk/build/intellij/OHLA.iws 2006-12-21 19:25:58 UTC (rev 83) @@ -85,21 +85,6 @@ <disable_hints /> </component> <component name="DebuggerManager"> - <line_breakpoints> - <breakpoint url="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/objects/ObjectInstance.java" line="163" class="net.sf.ohla.rti1516.federate.objects.ObjectInstance" package="net.sf.ohla.rti1516.federate.objects"> - <option name="ENABLED" value="true" /> - <option name="SUSPEND_POLICY" value="SuspendAll" /> - <option name="LOG_ENABLED" value="false" /> - <option name="LOG_EXPRESSION_ENABLED" value="false" /> - <option name="COUNT_FILTER_ENABLED" value="false" /> - <option name="COUNT_FILTER" value="0" /> - <option name="CONDITION_ENABLED" value="false" /> - <option name="CLASS_FILTERS_ENABLED" value="false" /> - <option name="INSTANCE_FILTERS_ENABLED" value="false" /> - <option name="CONDITION" value="" /> - <option name="LOG_MESSAGE" value="" /> - </breakpoint> - </line_breakpoints> <breakpoint_any> <breakpoint> <option name="NOTIFY_CAUGHT" value="true" /> @@ -183,7 +168,58 @@ <option name="myCurrentFavoritesList" value="OHLA" /> </component> <component name="FileEditorManager"> - <leaf /> + <leaf> + <file leaf-file-name="FederationExecution.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java"> + <provider selected="true" editor-type-id="text-editor"> + <state line="403" column="0" selection-start="14488" selection-end="14488" vertical-scroll-proportion="0.021197008"> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="ObjectInstance.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/objects/ObjectInstance.java"> + <provider selected="true" editor-type-id="text-editor"> + <state line="47" column="13" selection-start="1932" selection-end="1932" vertical-scroll-proportion="0.021197008"> + <folding> + <element signature="imports" expanded="true" /> + <marker date="1166728743453" expanded="true" signature="13916:13936" placeholder="{...}" /> + </folding> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="ObjectManager.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/objects/ObjectManager.java"> + <provider selected="true" editor-type-id="text-editor"> + <state line="74" column="14" selection-start="2434" selection-end="2434" vertical-scroll-proportion="0.70746636"> + <folding> + <marker date="1166728740359" expanded="true" signature="2068:2178" placeholder="{...}" /> + </folding> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="AttributeInstance.java" pinned="false" current="true" current-in-tab="true"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/objects/AttributeInstance.java"> + <provider selected="true" editor-type-id="text-editor"> + <state line="18" column="0" selection-start="655" selection-end="655" vertical-scroll-proportion="0.08323134"> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="AttributeInstance.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/objects/AttributeInstance.java"> + <provider selected="true" editor-type-id="text-editor"> + <state line="30" column="13" selection-start="1035" selection-end="1035" vertical-scroll-proportion="0.124847"> + <folding /> + </state> + </provider> + </entry> + </file> + </leaf> </component> <component name="FindManager"> <FindUsagesManager> @@ -308,7 +344,7 @@ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> </PATH_ELEMENT> <PATH_ELEMENT> - <option name="myItemId" value="OHLA" /> + <option name="myItemId" value="RTI" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> </PATH_ELEMENT> </PATH> @@ -318,13 +354,29 @@ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> </PATH_ELEMENT> <PATH_ELEMENT> - <option name="myItemId" value="OHLA" /> + <option name="myItemId" value="RTI" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> </PATH_ELEMENT> <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4" /> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> </PATH> <PATH> <PATH_ELEMENT> @@ -332,17 +384,33 @@ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> </PATH_ELEMENT> <PATH_ELEMENT> - <option name="myItemId" value="OHLA" /> + <option name="myItemId" value="RTI" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> </PATH_ELEMENT> <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4" /> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> </PATH_ELEMENT> <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4\build" /> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516\federation" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> </PATH> <PATH> <PATH_ELEMENT> @@ -350,22 +418,158 @@ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> </PATH_ELEMENT> <PATH_ELEMENT> - <option name="myItemId" value="OHLA" /> + <option name="myItemId" value="RTI" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> </PATH_ELEMENT> <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4" /> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> </PATH_ELEMENT> <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4\build" /> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> </PATH_ELEMENT> <PATH_ELEMENT> - <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4\build\intellij" /> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516\federation" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516\federation\objects" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="OHLA.ipr" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="RTI" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516\federate" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="OHLA.ipr" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="RTI" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516\federate" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla\rti1516\federate\objects" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="OHLA.ipr" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="RTI" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java\net\sf\ohla" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="OHLA.ipr" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="RTI" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:D:\projects\ohla-0.4-latest\rti\src\java" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> </component> <component name="ProjectReloadState"> <option name="STATE" value="0" /> @@ -378,7 +582,7 @@ <showLibraryContents /> <hideEmptyPackages ProjectPane="true" /> <abbreviatePackageNames /> - <showStructure PackagesPane="false" Favorites="false" ProjectPane="false" Scope="false" /> + <showStructure PackagesPane="false" ProjectPane="false" Favorites="false" Scope="false" /> <autoscrollToSource /> <autoscrollFromSource /> <sortByType /> @@ -397,8 +601,8 @@ <property name="cvs_file_history_flatOrder1" value="1" /> <property name="cvs_file_history_flatWidth1" value="299" /> <property name="cvs_file_history_treeWidth1" value="299" /> + <property name="cvs_file_history_treeOrder2" value="2" /> <property name="cvs_file_history_treeWidth3" value="298" /> - <property name="cvs_file_history_treeOrder2" value="2" /> <property name="GoToClass.includeLibraries" value="false" /> <property name="cvs_file_history_flatOrder2" value="2" /> <property name="MemberChooser.showClasses" value="true" /> @@ -407,8 +611,8 @@ <property name="cvs_file_history_treeWidth2" value="299" /> <property name="cvs_file_history_flatOrder3" value="3" /> <property name="GoToClass.toSaveIncludeLibraries" value="false" /> + <property name="RunManagerConfig.showSettingsBeforeRunnig" value="true" /> <property name="cvs_file_history_treeOrder0" value="0" /> - <property name="RunManagerConfig.showSettingsBeforeRunnig" value="true" /> </component> <component name="ReadonlyStatusHandler"> <option name="SHOW_DIALOG" value="true" /> @@ -425,17 +629,12 @@ <component name="RestoreUpdateTree" /> <component name="RunManager"> <activeType name="Application" /> - <configuration selected="false" default="true" type="Applet" factoryName="Applet"> - <module name="" /> - <option name="MAIN_CLASS_NAME" /> - <option name="HTML_FILE_NAME" /> - <option name="HTML_USED" value="false" /> - <option name="WIDTH" value="400" /> - <option name="HEIGHT" value="300" /> - <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" /> - <option name="VM_PARAMETERS" /> - <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> - <option name="ALTERNATIVE_JRE_PATH" /> + <configuration selected="false" default="true" type="Remote" factoryName="Remote"> + <option name="USE_SOCKET_TRANSPORT" value="true" /> + <option name="SERVER_MODE" value="false" /> + <option name="SHMEM_ADDRESS" value="javadebug" /> + <option name="HOST" value="localhost" /> + <option name="PORT" value="5005" /> </configuration> <configuration selected="false" default="true" type="JUnit" factoryName="JUnit"> <module name="" /> @@ -453,6 +652,18 @@ <value defaultName="wholeProject" /> </option> </configuration> + <configuration selected="false" default="true" type="Applet" factoryName="Applet"> + <module name="" /> + <option name="MAIN_CLASS_NAME" /> + <option name="HTML_FILE_NAME" /> + <option name="HTML_USED" value="false" /> + <option name="WIDTH" value="400" /> + <option name="HEIGHT" value="300" /> + <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" /> + <option name="VM_PARAMETERS" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + </configuration> <configuration selected="false" default="true" type="TestNG" factoryName="TestNG"> <module name="" /> <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> @@ -473,13 +684,6 @@ <option name="PROPERTIES_FILE" /> <properties /> </configuration> - <configuration selected="false" default="true" type="Remote" factoryName="Remote"> - <option name="USE_SOCKET_TRANSPORT" value="true" /> - <option name="SERVER_MODE" value="false" /> - <option name="SHMEM_ADDRESS" value="javadebug" /> - <option name="HOST" value="localhost" /> - <option name="PORT" value="5005" /> - </configuration> <configuration selected="false" default="true" type="Application" factoryName="Application"> <option name="MAIN_CLASS_NAME" /> <option name="VM_PARAMETERS" /> @@ -508,14 +712,14 @@ </option> <option name="PROPERTIES_FILE" value="" /> <properties /> - <RunnerSettings RunnerId="Run" /> <RunnerSettings RunnerId="Debug"> <option name="DEBUG_PORT" value="2019" /> <option name="TRANSPORT" value="0" /> <option name="LOCAL" value="true" /> </RunnerSettings> + <RunnerSettings RunnerId="Run" /> + <ConfigurationWrapper RunnerId="Debug" /> <ConfigurationWrapper RunnerId="Run" /> - <ConfigurationWrapper RunnerId="Debug" /> </configuration> <configuration selected="true" default="false" name="HLA 1.3 Testsuite" type="TestNG" factoryName="TestNG"> <module name="RTI" /> @@ -545,14 +749,14 @@ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> <option name="ALTERNATIVE_JRE_PATH" value="" /> <module name="RTI" /> - <RunnerSettings RunnerId="Run" /> <RunnerSettings RunnerId="Debug"> <option name="DEBUG_PORT" value="2738" /> <option name="TRANSPORT" value="0" /> <option name="LOCAL" value="true" /> </RunnerSettings> + <RunnerSettings RunnerId="Run" /> + <ConfigurationWrapper RunnerId="Debug" /> <ConfigurationWrapper RunnerId="Run" /> - <ConfigurationWrapper RunnerId="Debug" /> </configuration> </component> <component name="ScopeViewComponent"> @@ -624,12 +828,12 @@ </todo-panel> </component> <component name="ToolWindowManager"> - <frame x="-9" y="-2" width="1288" height="998" extended-state="0" /> - <editor active="false" /> + <frame x="-4" y="-4" width="1288" height="998" extended-state="6" /> + <editor active="true" /> <layout> <window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="8" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.32791588" order="7" /> - <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.21278317" order="0" /> + <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.3802589" order="0" /> <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.34367815" order="1" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="1" /> <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.32413793" order="8" /> @@ -639,7 +843,7 @@ <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.32988507" order="8" /> <window_info id="Metrics" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="8" /> <window_info id="Favorites" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.32928804" order="3" /> - <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.1553398" order="1" /> + <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.1553398" order="1" /> <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.27816093" order="2" /> <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="2" /> <window_info id="File View" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="3" /> @@ -682,7 +886,7 @@ <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" /> <option name="PUT_FOCUS_INTO_COMMENT" value="false" /> <option name="FORCE_NON_EMPTY_COMMENT" value="false" /> - <option name="LAST_COMMIT_MESSAGE" value="renamed some variables" /> + <option name="LAST_COMMIT_MESSAGE" value="more refactoring in preparation of moving to centralized RTI" /> <option name="SAVE_LAST_COMMIT_MESSAGE" value="true" /> <option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" /> <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" /> @@ -696,7 +900,6 @@ <option name="UPDATE_GROUP_BY_PACKAGES" value="false" /> <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" /> <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" /> - <MESSAGE value="fixed incorrect compareTo methods and added @Override tags" /> <MESSAGE value="added target to create javadocs" /> <MESSAGE value="spec says that if no synchronization set is supplied OR it is empty, than all joined federates are part of the synchronization set" /> <MESSAGE value="adding documentation" /> @@ -705,6 +908,8 @@ <MESSAGE value="- added synchronization point tests to HLA 1.3 testsuite - removed some unused constants from TestConstants" /> <MESSAGE value="more synchronization point test cases" /> <MESSAGE value="renamed some variables" /> + <MESSAGE value="refactoring in preparation of moving to centralized RTI" /> + <MESSAGE value="more refactoring in preparation of moving to centralized RTI" /> </component> <component name="VssConfiguration"> <option name="CLIENT_PATH" value="" /> @@ -785,111 +990,116 @@ <option name="myLastEditedConfigurable" /> </component> <component name="editorHistoryManager"> - <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/messages/FederateSaveInitiated.java"> + <entry file="file://$PROJECT_DIR$/../../hla-1.3/src/java/hla/rti/FederateAmbassador.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="32" column="34" selection-start="955" selection-end="955" vertical-scroll-proportion="0.51224107"> + <state line="61" column="45" selection-start="1973" selection-end="1973" vertical-scroll-proportion="0.2685069"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/filter/InterestManagementFilter.java"> + <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/ObjectManagementTestNG.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="243" column="37" selection-start="8806" selection-end="8806" vertical-scroll-proportion="0.56092435"> + <state line="295" column="12" selection-start="10776" selection-end="10776" vertical-scroll-proportion="0.3412798"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/callbacks/ReflectAttributeValues.java"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/FederateSave.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="48" column="15" selection-start="1750" selection-end="1750" vertical-scroll-proportion="0.5988258"> + <state line="48" column="3" selection-start="1321" selection-end="1321" vertical-scroll-proportion="0.45294857"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../ieee-1516/src/java/hla/rti1516/jlc/NullFederateAmbassador.java"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/SubscriptionManager.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="76" column="0" selection-start="2635" selection-end="2635" vertical-scroll-proportion="0.33291772"> + <state line="230" column="21" selection-start="7508" selection-end="7508" vertical-scroll-proportion="0.21867007"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../ieee-1516/src/java/hla/rti1516/FederateAmbassador.java"> - <provider selected="true" editor-type-id="text-editor"> - <state line="40" column="60" selection-start="1623" selection-end="1623" vertical-scroll-proportion="0.33291772"> - <folding /> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/Federate.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="498" column="42" selection-start="20308" selection-end="20308" vertical-scroll-proportion="0.3414322"> + <state line="242" column="13" selection-start="11390" selection-end="11390" vertical-scroll-proportion="0.33333334"> <folding> <element signature="imports" expanded="true" /> </folding> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../hla-1.3/src/java/hla/rti/ReflectedAttributes.java"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/fdd/FDD.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="2" column="17" selection-start="35" selection-end="35" vertical-scroll-proportion="0.042659976"> + <state line="679" column="49" selection-start="19954" selection-end="19954" vertical-scroll-proportion="0.10922787"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../hla-1.3/src/java/hla/rti/RTIambassador.java"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/fdd/Attribute.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="42" column="0" selection-start="1835" selection-end="1835" vertical-scroll-proportion="0.3412798"> + <state line="37" column="37" selection-start="1109" selection-end="1109" vertical-scroll-proportion="-0.2881356"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti/OHLARTIambassador.java"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/fdd/ObjectClass.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="341" column="12" selection-start="11764" selection-end="11764" vertical-scroll-proportion="0.9066496"> + <state line="36" column="13" selection-start="1089" selection-end="1089" vertical-scroll-proportion="-2.5932202"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../hla-1.3/src/java/hla/rti/FederateAmbassador.java"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/objects/ObjectInstance.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="61" column="45" selection-start="1973" selection-end="1973" vertical-scroll-proportion="0.2685069"> + <state line="76" column="0" selection-start="3199" selection-end="3199" vertical-scroll-proportion="-1.60454"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../testsuite/src/java/net/sf/ohla/rti1516/ObjectManagementTestNG.java"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/objects/ObjectManager.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="295" column="12" selection-start="10776" selection-end="10776" vertical-scroll-proportion="0.3412798"> - <folding /> + <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="-1.3990026"> + <folding> + <element signature="imports" expanded="true" /> + </folding> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/FederateSave.java"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="48" column="3" selection-start="1321" selection-end="1321" vertical-scroll-proportion="0.45294857"> + <state line="403" column="0" selection-start="14488" selection-end="14488" vertical-scroll-proportion="0.021197008"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/objects/ObjectManager.java"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/objects/ObjectInstance.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="966" column="14" selection-start="28910" selection-end="28910" vertical-scroll-proportion="0.58056265"> + <state line="47" column="13" selection-start="1932" selection-end="1932" vertical-scroll-proportion="0.021197008"> <folding> <element signature="imports" expanded="true" /> + <marker date="1166728743453" expanded="true" signature="13916:13936" placeholder="{...}" /> </folding> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/objects/ObjectInstance.java"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/objects/ObjectManager.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="77" column="13" selection-start="3213" selection-end="3213" vertical-scroll-proportion="0.13043478"> + <state line="74" column="14" selection-start="2434" selection-end="2434" vertical-scroll-proportion="0.70746636"> + <folding> + <marker date="1166728740359" expanded="true" signature="2068:2178" placeholder="{...}" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/objects/AttributeInstance.java"> + <provider selected="true" editor-type-id="text-editor"> + <state line="30" column="13" selection-start="1035" selection-end="1035" vertical-scroll-proportion="0.124847"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federate/SubscriptionManager.java"> + <entry file="file://$PROJECT_DIR$/../../rti/src/java/net/sf/ohla/rti1516/federation/objects/AttributeInstance.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="230" column="21" selection-start="7508" selection-end="7508" vertical-scroll-proportion="0.21867007"> + <state line="18" column="0" selection-start="655" selection-end="655" vertical-scroll-proportion="0.08323134"> <folding /> </state> </provider> Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java 2006-12-21 19:19:58 UTC (rev 82) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java 2006-12-21 19:25:58 UTC (rev 83) @@ -35,7 +35,7 @@ import net.sf.ohla.rti1516.federate.callbacks.FederationSynchronized; import net.sf.ohla.rti1516.federate.callbacks.InitiateFederateSave; import net.sf.ohla.rti1516.federate.callbacks.RemoveObjectInstance; -import net.sf.ohla.rti1516.federation.objects.ObjectManager; +import net.sf.ohla.rti1516.federation.ownership.OwnershipManager; import net.sf.ohla.rti1516.federation.time.TimeKeeper; import net.sf.ohla.rti1516.messages.AttributeOwnershipAcquisition; import net.sf.ohla.rti1516.messages.AttributeOwnershipAcquisitionIfAvailable; @@ -140,7 +140,7 @@ protected Map<RegionHandle, Map<DimensionHandle, RangeBounds>> regions = new HashMap<RegionHandle, Map<DimensionHandle, RangeBounds>>(); - protected ObjectManager objectManager = new ObjectManager(this); + protected OwnershipManager ownershipManager = new OwnershipManager(this); protected TimeKeeper timeKeeper; @@ -401,7 +401,7 @@ session.write(new RequestResponse( registerObjectInstance.getId(), objectInstanceRegistered)); - objectManager.registerObjectInstance( + ownershipManager.registerObjectInstance( objectInstanceHandle, objectClass, registerObjectInstance.getPublishedAttributeHandles(), getFederateHandle(session)); @@ -530,7 +530,7 @@ subscribeObjectClassAttributes.getObjectClassHandle()); assert objectClass != null; - objectManager.subscribeObjectClassAttributes( + ownershipManager.subscribeObjectClassAttributes( objectClass, subscribeObjectClassAttributes.getAttributeHandles(), subscribeObjectClassAttributes.getAttributesAndRegions(), session); } @@ -1060,7 +1060,7 @@ federationExecutionStateLock.readLock().lock(); try { - objectManager.unconditionalAttributeOwnershipDivestiture( + ownershipManager.unconditionalAttributeOwnershipDivestiture( unconditionalAttributeOwnershipDivestiture.getObjectInstanceHandle(), unconditionalAttributeOwnershipDivestiture.getAttributeHandles()); } @@ -1077,7 +1077,7 @@ federationExecutionStateLock.readLock().lock(); try { - objectManager.negotiatedAttributeOwnershipDivestiture( + ownershipManager.negotiatedAttributeOwnershipDivestiture( negotiatedAttributeOwnershipDivestiture.getObjectInstanceHandle(), negotiatedAttributeOwnershipDivestiture.getAttributeHandles(), negotiatedAttributeOwnershipDivestiture.getTag(), session); @@ -1094,7 +1094,7 @@ federationExecutionStateLock.readLock().lock(); try { - objectManager.confirmDivestiture( + ownershipManager.confirmDivestiture( confirmDivestiture.getObjectInstanceHandle(), confirmDivestiture.getAttributeHandles()); } @@ -1111,7 +1111,7 @@ federationExecutionStateLock.readLock().lock(); try { - objectManager.attributeOwnershipAcquisition( + ownershipManager.attributeOwnershipAcquisition( attributeOwnershipAcquisition.getObjectInstanceHandle(), attributeOwnershipAcquisition.getAttributeHandles(), attributeOwnershipAcquisition.getTag(), getFederateHandle(session), @@ -1130,7 +1130,7 @@ federationExecutionStateLock.readLock().lock(); try { - objectManager.attributeOwnershipAcquisitionIfAvailable( + ownershipManager.attributeOwnershipAcquisitionIfAvailable( attributeOwnershipAcquisitionIfAvailable.getObjectInstanceHandle(), attributeOwnershipAcquisitionIfAvailable.getAttributeHandles(), getFederateHandle(session), session); @@ -1149,7 +1149,7 @@ try { Map<AttributeHandle, FederateHandle> newOwners = - objectManager.attributeOwnershipDivestitureIfWanted( + ownershipManager.attributeOwnershipDivestitureIfWanted( attributeOwnershipDivestitureIfWanted.getObjectInstanceHandle(), attributeOwnershipDivestitureIfWanted.getAttributeHandles()); @@ -1235,7 +1235,7 @@ federationExecutionStateLock.readLock().lock(); try { - objectManager.cancelNegotiatedAttributeOwnershipDivestiture( + ownershipManager.cancelNegotiatedAttributeOwnershipDivestiture( cancelNegotiatedAttributeOwnershipDivestiture.getObjectInstanceHandle(), cancelNegotiatedAttributeOwnershipDivestiture.getAttributeHandles(), getFederateHandle(session)); @@ -1253,7 +1253,7 @@ federationExecutionStateLock.readLock().lock(); try { - objectManager.cancelAttributeOwnershipAcquisition( + ownershipManager.cancelAttributeOwnershipAcquisition( cancelAttributeOwnershipAcquisition.getObjectInstanceHandle(), cancelAttributeOwnershipAcquisition.getAttributeHandles(), getFederateHandle(session), session); @@ -1270,7 +1270,7 @@ federationExecutionStateLock.readLock().lock(); try { - objectManager.queryAttributeOwnership( + ownershipManager.queryAttributeOwnership( queryAttributeOwnership.getObjectInstanceHandle(), queryAttributeOwnership.getAttributeHandle(), session); } Copied: trunk/rti/src/java/net/sf/ohla/rti1516/federation/ownership (from rev 79, trunk/rti/src/java/net/sf/ohla/rti1516/federation/ownership) Deleted: trunk/rti/src/java/net/sf/ohla/rti1516/federation/ownership/AttributeInstanceOwnership.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federation/ownership/AttributeInstanceOwnership.java 2006-12-16 03:12:41 UTC (rev 79) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/ownership/AttributeInstanceOwnership.java 2006-12-21 19:25:58 UTC (rev 83) @@ -1,167 +0,0 @@ -/* - * Copyright (c) 2006, Michael Newcomb - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package net.sf.ohla.rti1516.federation.ownership; - -import java.util.Iterator; -import java.util.LinkedHashSet; - -import net.sf.ohla.rti1516.fdd.Attribute; - -import hla.rti1516.FederateHandle; - -public class AttributeInstanceOwnership -{ - protected final Attribute attribute; - - protected FederateHandle owner; - - /** - * Set if the owner of this attribute is willing to divest ownership. - */ - protected boolean wantsToDivest; - - /** - * The 'ownership' line. When federates request ownership of this attribute - * they are placed into a line and given ownership based upon when they - * entered the line. - */ - protected LinkedHashSet<FederateHandle> requestingOwnership = - new LinkedHashSet<FederateHandle>(); - - public AttributeInstanceOwnership(Attribute attribute) - { - this.attribute = attribute; - } - - public Attribute getAttribute() - { - return attribute; - } - - public FederateHandle getOwner() - { - return owner; - } - - public void setOwner(FederateHandle owner) - { - this.owner = owner; - } - - public boolean wantsToDivest() - { - return wantsToDivest; - } - - public FederateHandle unconditionalAttributeOwnershipDivestiture() - { - owner = null; - wantsToDivest = false; - - // give ownership to the next in line - // - if (!requestingOwnership.isEmpty()) - { - Iterator<FederateHandle> i = requestingOwnership.iterator(); - owner = i.next(); - i.remove(); - } - - return owner; - } - - public boolean negotiatedAttributeOwnershipDivestiture(byte[] tag) - { - wantsToDivest = true; - - return !requestingOwnership.isEmpty(); - } - - public FederateHandle confirmDivestiture() - { - owner = null; - wantsToDivest = false; - - // give ownership to the next in line - // - if (!requestingOwnership.isEmpty()) - { - Iterator<FederateHandle> i = requestingOwnership.iterator(); - owner = i.next(); - i.remove(); - } - - return owner; - } - - public FederateHandle attributeOwnershipAcquisition(FederateHandle acquiree) - { - if (!attributeOwnershipAcquisitionIfAvailable(acquiree)) - { - // get in line - // - requestingOwnership.add(acquiree); - } - - return owner; - } - - public boolean attributeOwnershipAcquisitionIfAvailable( - FederateHandle acquiree) - { - if (owner == null) - { - // acquire this attribute if it is unowned - // - owner = acquiree; - wantsToDivest = false; - } - return owner == acquiree; - } - - public FederateHandle attributeOwnershipDivestitureIfWanted() - { - boolean divested = !requestingOwnership.isEmpty(); - - // give ownership to the next in line - // - if (divested) - { - Iterator<FederateHandle> i = requestingOwnership.iterator(); - owner = i.next(); - i.remove(); - - wantsToDivest = false; - } - - return divested ? owner : null; - } - - public boolean cancelAttributeOwnershipAcquisition(FederateHandle acquiree) - { - return requestingOwnership.remove(acquiree); - } - - public void cancelNegotiatedAttributeOwnershipDivestiture( - FederateHandle owner) - { - if (owner.equals(this.owner)) - { - wantsToDivest = false; - } - } -} Copied: trunk/rti/src/java/net/sf/ohla/rti1516/federation/ownership/AttributeInstanceOwnership.java (from rev 79, trunk/rti/src/java/net/sf/ohla/rti1516/federation/ownership/AttributeInstanceOwnership.java) =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federation/ownership/AttributeInstanceOwnership.java (rev 0) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/ownership/AttributeInstanceOwnership.java 2006-12-21 19:25:58 UTC (rev 83) @@ -0,0 +1,167 @@ +/* + * Copyright (c) 2006, Michael Newcomb + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package net.sf.ohla.rti1516.federation.ownership; + +import java.util.Iterator; +import java.util.LinkedHashSet; + +import net.sf.ohla.rti1516.fdd.Attribute; + +import hla.rti1516.FederateHandle; + +public class AttributeInstanceOwnership +{ + protected final Attribute attribute; + + protected FederateHandle owner; + + /** + * Set if the owner of this attribute is willing to divest ownership. + */ + protected boolean wantsToDivest; + + /** + * The 'ownership' line. When federates request ownership of this attribute + * they are placed into a line and given ownership based upon when they + * entered the line. + */ + protected LinkedHashSet<FederateHandle> requestingOwnership = + new LinkedHashSet<FederateHandle>(); + + public AttributeInstanceOwnership(Attribute attribute) + { + this.attribute = attribute; + } + + public Attribute getAttribute() + { + return attribute; + } + + public FederateHandle getOwner() + { + return owner; + } + + public void setOwner(FederateHandle owner) + { + this.owner = owner; + } + + public boolean wantsToDivest() + { + return wantsToDivest; + } + + public FederateHandle unconditionalAttributeOwnershipDivestiture() + { + owner = null; + wantsToDivest = false; + + // give ownership to the next in line + // + if (!requestingOwnership.isEmpty()) + { + Iterator<FederateHandle> i = requestingOwnership.iterator(); + owner = i.next(); + i.remove(); + } + + return owner; + } + + public boolean negotiatedAttributeOwnershipDivestiture(byte[] tag) + { + wantsToDivest = true; + + return !requestingOwnership.isEmpty(); + } + + public FederateHandle confirmDivestiture() + { + owner = null; + wantsToDivest = false; + + // give ownership to the next in line + // + if (!requestingOwnership.isEmpty()) + { + Iterator<FederateHandle> i = requestingOwnership.iterator(); + owner = i.next(); + i.remove(); + } + + return owner; + } + + public FederateHandle attributeOwnershipAcquisition(FederateHandle acquiree) + { + if (!attributeOwnershipAcquisitionIfAvailable(acquiree)) + { + // get in line + // + requestingOwnership.add(acquiree); + } + + return owner; + } + + public boolean attributeOwnershipAcquisitionIfAvailable( + FederateHandle acquiree) + { + if (owner == null) + { + // acquire this attribute if it is unowned + // + owner = acquiree; + wantsToDivest = false; + } + return owner == acquiree; + } + + public FederateHandle attributeOwnershipDivestitureIfWanted() + { + boolean divested = !requestingOwnership.isEmpty(); + + // give ownership to the next in line + // + if (divested) + { + Iterator<FederateHandle> i = requestingOwnership.iterator(); + owner = i.next(); + i.remove(); + + wantsToDivest = false; + } + + return divested ? owner : null; + } + + public boolean cancelAttributeOwnershipAcquisition(FederateHandle acquiree) + { + return requestingOwnership.remove(acquiree); + } + + public void cancelNegotiatedAttributeOwnershipDivestiture( + FederateHandle owner) + { + if (owner.equals(this.owner)) + { + wantsToDivest = false; + } + } +} Deleted: trunk/rti/src/java/net/sf/ohla/rti1516/federation/ownership/ObjectInstanceOwnership.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federation/ownership/ObjectInstanceOwnership.java 2006-12-16 03:12:41 UTC (rev 79) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/ownership/ObjectInstanceOwnership.java 2006-12-21 19:25:58 UTC (rev 83) @@ -1,450 +0,0 @@ -/* - * Copyright (c) 2006, Michael Newcomb - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package net.sf.ohla.rti1516.federation.ownership; - -import java.util.HashMap; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.locks.Lock; -import java.util.concurrent.locks.ReentrantLock; - -import net.sf.ohla.rti1516.fdd.ObjectClass; -import net.sf.ohla.rti1516.fdd.Attribute; -import net.sf.ohla.rti1516.federate.callbacks.AttributeOwnershipAcquisitionNotification; -import net.sf.ohla.rti1516.federate.callbacks.AttributeOwnershipUnavailable; -import net.sf.ohla.rti1516.federate.callbacks.ConfirmAttributeOwnershipAcquisitionCancellation; -import net.sf.ohla.rti1516.federate.callbacks.RequestAttributeOwnershipRelease; -import net.sf.ohla.rti1516.federate.callbacks.RequestDivestitureConfirmation; -import net.sf.ohla.rti1516.federate.callbacks.AttributeIsNotOwned; -import net.sf.ohla.rti1516.federate.callbacks.AttributeIsOwnedByRTI; -import net.sf.ohla.rti1516.federate.callbacks.InformAttributeOwnership; -import net.sf.ohla.rti1516.OHLAAttributeHandleSet; -import net.sf.ohla.rti1516.federation.FederationExecution; - -import org.apache.mina.common.IoSession; - -import hla.rti1516.AttributeHandle; -import hla.rti1516.AttributeHandleSet; -import hla.rti1516.FederateHandle; -import hla.rti1516.ObjectInstanceHandle; - -public class ObjectInstanceOwnership -{ - protected ObjectInstanceHandle objectInstanceHandle; - protected ObjectClass objectClass; - - protected Lock objectLock = new ReentrantLock(true); - - protected Map<AttributeHandle, AttributeInstanceOwnership> attributes = - new HashMap<AttributeHandle, AttributeInstanceOwnership>(); - - public ObjectInstanceOwnership(ObjectInstanceHandle objectInstanceHandle, - ObjectClass objectClass, - Set<AttributeHandle> publishedAttributeHandles, - FederateHandle owner) - { - this.objectInstanceHandle = objectInstanceHandle; - this.objectClass = objectClass; - - for (Attribute attribute : objectClass.getAttributes().values()) - { - AttributeInstanceOwnership attributeInstanceOwnership = - new AttributeInstanceOwnership(attribute); - attributes.put(attribute.getAttributeHandle(), - attributeInstanceOwnership); - - if (publishedAttributeHandles.contains(attribute.getAttributeHandle())) - { - attributeInstanceOwnership.setOwner(owner); - } - } - } - - public ObjectInstanceHandle getObjectInstanceHandle() - { - return objectInstanceHandle; - } - - public ObjectClass getObjectClass() - { - return objectClass; - } - - public FederateHandle getOwner(AttributeHandle attributeHandle) - { - return attributes.get(attributeHandle).getOwner(); - } - - public void unconditionalAttributeOwnershipDivestiture( - AttributeHandleSet attributeHandles, - FederationExecution federationExecution) - { - objectLock.lock(); - try - { - Map<FederateHandle, AttributeHandleSet> newOwners = - new HashMap<FederateHandle, AttributeHandleSet>(); - for (AttributeHandle attributeHandle : attributeHandles) - { - FederateHandle newOwner = - attributes.get( - attributeHandle).unconditionalAttributeOwnershipDivestiture(); - if (newOwner != null) - { - AttributeHandleSet acquiredAttributes = newOwners.get(newOwner); - if (acquiredAttributes == null) - { - acquiredAttributes = new OHLAAttributeHandleSet(); - newOwners.put(newOwner, acquiredAttributes); - } - acquiredAttributes.add(attributeHandle); - } - } - - // notify the new owners - // - for (Map.Entry<FederateHandle, AttributeHandleSet> entry : - newOwners.entrySet()) - { - IoSession ownerSession = - federationExecution.getFederateSession(entry.getKey()); - if (ownerSession != null) - { - ownerSession.write(new AttributeOwnershipAcquisitionNotification( - objectInstanceHandle, entry.getValue())); - } - } - } - finally - { - objectLock.unlock(); - } - } - - public void negotiatedAttributeOwnershipDivestiture( - AttributeHandleSet attributeHandles, byte[] tag, IoSession session) - { - objectLock.lock(); - try - { - AttributeHandleSet divestableAttributeHandles = - new OHLAAttributeHandleSet(); - for (AttributeHandle attributeHandle : attributeHandles) - { - if (attributes.get( - attributeHandle).negotiatedAttributeOwnershipDivestiture(tag)) - { - divestableAttributeHandles.add(attributeHandle); - } - } - - if (!divestableAttributeHandles.isEmpty()) - { - session.write(new RequestDivestitureConfirmation( - objectInstanceHandle, divestableAttributeHandles)); - } - } - finally - { - objectLock.unlock(); - } - } - - public void confirmDivestiture(AttributeHandleSet attributeHandles, - FederationExecution federationExecution) - { - objectLock.lock(); - try - { - Map<FederateHandle, AttributeHandleSet> newOwners = - new HashMap<FederateHandle, AttributeHandleSet>(); - for (AttributeHandle attributeHandle : attributeHandles) - { - FederateHandle newOwner = - attributes.get(attributeHandle).confirmDivestiture(); - if (newOwner != null) - { - AttributeHandleSet acquiredAttributes = newOwners.get(newOwner); - if (acquiredAttributes == null) - { - acquiredAttributes = new OHLAAttributeHandleSet(); - newOwners.put(newOwner, acquiredAttributes); - } - acquiredAttributes.add(attributeHandle); - System.out.printf("%s - %s\n", newOwner, acquiredAttributes); - } - } - - // notify the new owners - // - for (Map.Entry<... [truncated message content] |