[ohla-devel] SF.net SVN: ohla: [115] trunk/rti/src/java/net/sf/ohla/rti
Status: Beta
Brought to you by:
mnewcomb
From: <mne...@us...> - 2007-02-13 03:16:05
|
Revision: 115 http://svn.sourceforge.net/ohla/?rev=115&view=rev Author: mnewcomb Date: 2007-02-12 19:16:02 -0800 (Mon, 12 Feb 2007) Log Message: ----------- - refactoring 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/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/FederationExecutionSave.java trunk/rti/src/java/net/sf/ohla/rti1516/local/FederateRestore.java trunk/rti/src/java/net/sf/ohla/rti1516/local/FederateRestoreState.java trunk/rti/src/java/net/sf/ohla/rti1516/local/FederateSave.java trunk/rti/src/java/net/sf/ohla/rti1516/local/FederateSaveState.java trunk/rti/src/java/net/sf/ohla/rti1516/local/LocalFederate.java trunk/rti/src/java/net/sf/ohla/rti1516/local/LocalMessageRetractionManager.java trunk/rti/src/java/net/sf/ohla/rti1516/local/LocalRegionManager.java trunk/rti/src/java/net/sf/ohla/rti1516/local/LocalSynchronizationPoint.java trunk/rti/src/java/net/sf/ohla/rti1516/local/LocalTimeManager.java trunk/rti/src/java/net/sf/ohla/rti1516/local/SubscriptionManager.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/FederateSaveComplete.java trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/CallbackManager.java Added Paths: ----------- trunk/rti/src/java/net/sf/ohla/rti1516/local/ Removed Paths: ------------- trunk/rti/src/java/net/sf/ohla/rti1516/federate/ Modified: trunk/rti/src/java/net/sf/ohla/rti/OHLARTIambassador.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti/OHLARTIambassador.java 2007-02-13 03:02:36 UTC (rev 114) +++ trunk/rti/src/java/net/sf/ohla/rti/OHLARTIambassador.java 2007-02-13 03:16:02 UTC (rev 115) @@ -36,7 +36,7 @@ import net.sf.ohla.rti1516.OHLAObjectInstanceHandle; import net.sf.ohla.rti1516.OHLAParameterHandle; import net.sf.ohla.rti1516.OHLARegionHandleSet; -import net.sf.ohla.rti1516.federate.LocalFederate; +import net.sf.ohla.rti1516.local.LocalFederate; import net.sf.ohla.rti1516.fdd.ObjectClass; import org.slf4j.Logger; Modified: trunk/rti/src/java/net/sf/ohla/rti1516/OHLARTIambassador.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/OHLARTIambassador.java 2007-02-13 03:02:36 UTC (rev 114) +++ trunk/rti/src/java/net/sf/ohla/rti1516/OHLARTIambassador.java 2007-02-13 03:16:02 UTC (rev 115) @@ -29,7 +29,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock; import net.sf.ohla.rti1516.fdd.FDD; -import net.sf.ohla.rti1516.federate.LocalFederate; +import net.sf.ohla.rti1516.local.LocalFederate; import net.sf.ohla.rti1516.filter.RequestResponseFilter; import net.sf.ohla.rti1516.messages.CreateFederationExecution; import net.sf.ohla.rti1516.messages.DestroyFederationExecution; 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-13 03:02:36 UTC (rev 114) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/Federate.java 2007-02-13 03:16:02 UTC (rev 115) @@ -52,13 +52,14 @@ import hla.rti1516.LogicalTime; import hla.rti1516.LogicalTimeInterval; import hla.rti1516.IllegalTimeArithmetic; +import hla.rti1516.ResignAction; public class Federate { private static final String FEDERATE_IO_FILTER = "FederateIoFilter"; protected final FederateHandle federateHandle; - protected final String federateType; + protected final String federateName; protected final IoSession session; protected final FederationExecution federationExecution; @@ -77,18 +78,20 @@ protected final Logger log = LoggerFactory.getLogger(getClass()); protected final Marker marker; - public Federate(FederateHandle federateHandle, String federateType, + public Federate(FederateHandle federateHandle, String federateName, IoSession session, FederationExecution federationExecution) { this.federateHandle = federateHandle; - this.federateType = federateType; + this.federateName = federateName; this.session = session; this.federationExecution = federationExecution; session.getFilterChain().addLast( FEDERATE_IO_FILTER, new FederateIoFilter(this, federationExecution)); - marker = MarkerFactory.getMarker(federateType); + marker = MarkerFactory.getMarker(federateName); + + log.debug(marker, "joined: {}", federateName); } public FederateHandle getFederateHandle() @@ -96,9 +99,9 @@ return federateHandle; } - public String getFederateType() + public String getFederateName() { - return federateType; + return federateName; } public IoSession getSession() @@ -141,9 +144,11 @@ return lits; } - public void resignFederationExecution() + public void resignFederationExecution(ResignAction resignAction) { session.getFilterChain().remove(FEDERATE_IO_FILTER); + + log.debug(marker, "resigned: {}", resignAction); } public WriteFuture announceSynchronizationPoint( @@ -364,6 +369,6 @@ public String toString() { return String.format("%s,%s,%s", federateHandle, - session.getLocalAddress(), federateType); + session.getLocalAddress(), federateName); } } 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-13 03:02:36 UTC (rev 114) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederateIoFilter.java 2007-02-13 03:16:02 UTC (rev 115) @@ -21,7 +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.federate.SubscriptionManager; +import net.sf.ohla.rti1516.local.SubscriptionManager; import net.sf.ohla.rti1516.messages.AttributeOwnershipAcquisition; import net.sf.ohla.rti1516.messages.AttributeOwnershipAcquisitionIfAvailable; import net.sf.ohla.rti1516.messages.AttributeOwnershipDivestitureIfWanted; 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-13 03:02:36 UTC (rev 114) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecution.java 2007-02-13 03:16:02 UTC (rev 115) @@ -228,8 +228,6 @@ new JoinFederationExecutionResponse( federateHandle, fdd, federationExecutionTimeManager.getGALT()))); - log.debug(marker, "federate joined: {}", federate); - // TODO: set timeout // writeFuture.join(); @@ -265,11 +263,10 @@ federatesLock.lock(); try { - federate.resignFederationExecution(); + federate.resignFederationExecution( + resignFederationExecution.getResignAction()); federates.remove(federate.getFederateHandle()); - - log.debug(marker, "federate resigned: {}", federate); } finally { Modified: trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecutionSave.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecutionSave.java 2007-02-13 03:02:36 UTC (rev 114) +++ trunk/rti/src/java/net/sf/ohla/rti1516/federation/FederationExecutionSave.java 2007-02-13 03:16:02 UTC (rev 115) @@ -25,7 +25,7 @@ import java.util.Map; import java.util.Set; -import net.sf.ohla.rti1516.federate.FederateSave; +import net.sf.ohla.rti1516.local.FederateSave; import hla.rti1516.FederateHandle; import hla.rti1516.FederateHandleSaveStatusPair; Copied: trunk/rti/src/java/net/sf/ohla/rti1516/local (from rev 113, trunk/rti/src/java/net/sf/ohla/rti1516/federate) Modified: trunk/rti/src/java/net/sf/ohla/rti1516/local/FederateRestore.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/FederateRestore.java 2007-02-13 02:47:48 UTC (rev 113) +++ trunk/rti/src/java/net/sf/ohla/rti1516/local/FederateRestore.java 2007-02-13 03:16:02 UTC (rev 115) @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.sf.ohla.rti1516.federate; +package net.sf.ohla.rti1516.local; public class FederateRestore { Modified: trunk/rti/src/java/net/sf/ohla/rti1516/local/FederateRestoreState.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/FederateRestoreState.java 2007-02-13 02:47:48 UTC (rev 113) +++ trunk/rti/src/java/net/sf/ohla/rti1516/local/FederateRestoreState.java 2007-02-13 03:16:02 UTC (rev 115) @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.sf.ohla.rti1516.federate; +package net.sf.ohla.rti1516.local; public enum FederateRestoreState { Modified: trunk/rti/src/java/net/sf/ohla/rti1516/local/FederateSave.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/FederateSave.java 2007-02-13 02:47:48 UTC (rev 113) +++ trunk/rti/src/java/net/sf/ohla/rti1516/local/FederateSave.java 2007-02-13 03:16:02 UTC (rev 115) @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.sf.ohla.rti1516.federate; +package net.sf.ohla.rti1516.local; import hla.rti1516.FederateHandle; Modified: trunk/rti/src/java/net/sf/ohla/rti1516/local/FederateSaveState.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/FederateSaveState.java 2007-02-13 02:47:48 UTC (rev 113) +++ trunk/rti/src/java/net/sf/ohla/rti1516/local/FederateSaveState.java 2007-02-13 03:16:02 UTC (rev 115) @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.sf.ohla.rti1516.federate; +package net.sf.ohla.rti1516.local; public enum FederateSaveState { Modified: trunk/rti/src/java/net/sf/ohla/rti1516/local/LocalFederate.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/LocalFederate.java 2007-02-13 02:47:48 UTC (rev 113) +++ trunk/rti/src/java/net/sf/ohla/rti1516/local/LocalFederate.java 2007-02-13 03:16:02 UTC (rev 115) @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.sf.ohla.rti1516.federate; +package net.sf.ohla.rti1516.local; import java.util.HashMap; import java.util.Map; @@ -44,8 +44,8 @@ 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.objects.ObjectManager; -import net.sf.ohla.rti1516.federate.LocalTimeManager; +import net.sf.ohla.rti1516.local.objects.ObjectManager; +import net.sf.ohla.rti1516.local.LocalTimeManager; import net.sf.ohla.rti1516.messages.FederateRestoreComplete; import net.sf.ohla.rti1516.messages.FederateRestoreNotComplete; import net.sf.ohla.rti1516.messages.FederateSaveBegun; Modified: trunk/rti/src/java/net/sf/ohla/rti1516/local/LocalMessageRetractionManager.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/LocalMessageRetractionManager.java 2007-02-13 02:47:48 UTC (rev 113) +++ trunk/rti/src/java/net/sf/ohla/rti1516/local/LocalMessageRetractionManager.java 2007-02-13 03:16:02 UTC (rev 115) @@ -1,4 +1,4 @@ -package net.sf.ohla.rti1516.federate; +package net.sf.ohla.rti1516.local; import java.util.HashMap; import java.util.Map; Modified: trunk/rti/src/java/net/sf/ohla/rti1516/local/LocalRegionManager.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/LocalRegionManager.java 2007-02-13 02:47:48 UTC (rev 113) +++ trunk/rti/src/java/net/sf/ohla/rti1516/local/LocalRegionManager.java 2007-02-13 03:16:02 UTC (rev 115) @@ -1,4 +1,4 @@ -package net.sf.ohla.rti1516.federate; +package net.sf.ohla.rti1516.local; import java.util.HashMap; import java.util.HashSet; Modified: trunk/rti/src/java/net/sf/ohla/rti1516/local/LocalSynchronizationPoint.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/LocalSynchronizationPoint.java 2007-02-13 02:47:48 UTC (rev 113) +++ trunk/rti/src/java/net/sf/ohla/rti1516/local/LocalSynchronizationPoint.java 2007-02-13 03:16:02 UTC (rev 115) @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.sf.ohla.rti1516.federate; +package net.sf.ohla.rti1516.local; import hla.rti1516.FederateHandleSet; import hla.rti1516.SynchronizationPointFailureReason; Modified: trunk/rti/src/java/net/sf/ohla/rti1516/local/LocalTimeManager.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/LocalTimeManager.java 2007-02-13 02:47:48 UTC (rev 113) +++ trunk/rti/src/java/net/sf/ohla/rti1516/local/LocalTimeManager.java 2007-02-13 03:16:02 UTC (rev 115) @@ -14,12 +14,12 @@ * limitations under the License. */ -package net.sf.ohla.rti1516.federate; +package net.sf.ohla.rti1516.local; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; -import net.sf.ohla.rti1516.federate.LocalFederate; +import net.sf.ohla.rti1516.local.LocalFederate; import net.sf.ohla.rti1516.messages.callbacks.TimeAdvanceGrant; import net.sf.ohla.rti1516.messages.DisableTimeConstrained; import net.sf.ohla.rti1516.messages.DisableTimeRegulation; @@ -642,7 +642,7 @@ catch (Throwable t) { log.warn(String.format( - "federate unable enable time regulation to: %s", time), t); + "federate unable to enable time regulation to: %s", time), t); } finally { @@ -665,7 +665,7 @@ catch (Throwable t) { log.warn(String.format( - "federate unable enable time constrained to: %s", time), t); + "federate unable to enable time constrained to: %s", time), t); } finally { Modified: trunk/rti/src/java/net/sf/ohla/rti1516/local/SubscriptionManager.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/federate/SubscriptionManager.java 2007-02-13 02:47:48 UTC (rev 113) +++ trunk/rti/src/java/net/sf/ohla/rti1516/local/SubscriptionManager.java 2007-02-13 03:16:02 UTC (rev 115) @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.sf.ohla.rti1516.federate; +package net.sf.ohla.rti1516.local; import java.util.HashMap; import java.util.Map; Modified: trunk/rti/src/java/net/sf/ohla/rti1516/messages/FederateSaveComplete.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/messages/FederateSaveComplete.java 2007-02-13 03:02:36 UTC (rev 114) +++ trunk/rti/src/java/net/sf/ohla/rti1516/messages/FederateSaveComplete.java 2007-02-13 03:16:02 UTC (rev 115) @@ -16,7 +16,7 @@ package net.sf.ohla.rti1516.messages; -import net.sf.ohla.rti1516.federate.FederateSave; +import net.sf.ohla.rti1516.local.FederateSave; public class FederateSaveComplete implements Message Modified: trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/CallbackManager.java =================================================================== --- trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/CallbackManager.java 2007-02-13 03:02:36 UTC (rev 114) +++ trunk/rti/src/java/net/sf/ohla/rti1516/messages/callbacks/CallbackManager.java 2007-02-13 03:16:02 UTC (rev 115) @@ -22,7 +22,7 @@ import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; -import net.sf.ohla.rti1516.federate.LocalFederate; +import net.sf.ohla.rti1516.local.LocalFederate; import org.slf4j.Logger; import org.slf4j.LoggerFactory; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |