public class TimeProviderAgent extends java.lang.Object implements ITimeService, jadex.bridge.IComponentStep<java.lang.Void>
Modifier and Type | Field and Description |
---|---|
protected jadex.bridge.IInternalAccess |
agent
The jadex component that executes the time provider agent.
|
protected java.lang.String |
location
The location (determined at startup).
|
protected java.util.Set<jadex.commons.future.SubscriptionIntermediateFuture<java.lang.String>> |
subscriptions
The subscriptions to be informed about the time.
|
Constructor and Description |
---|
TimeProviderAgent() |
Modifier and Type | Method and Description |
---|---|
protected static java.lang.String |
determineLocation()
Determine the location of the local platform.
|
jadex.commons.future.IFuture<java.lang.Void> |
execute(jadex.bridge.IInternalAccess ia)
Due to annotation, called once after agent is initialized.
|
java.lang.String |
getLocation()
Get the location of the platform, where the time service runs.
|
static void |
main(java.lang.String[] args) |
jadex.commons.future.ISubscriptionIntermediateFuture<java.lang.String> |
subscribe()
Subscribe to the time service.
|
protected jadex.bridge.IInternalAccess agent
protected java.lang.String location
protected java.util.Set<jadex.commons.future.SubscriptionIntermediateFuture<java.lang.String>> subscriptions
public jadex.commons.future.IFuture<java.lang.Void> execute(jadex.bridge.IInternalAccess ia)
execute
in interface jadex.bridge.IComponentStep<java.lang.Void>
public java.lang.String getLocation()
getLocation
in interface ITimeService
public jadex.commons.future.ISubscriptionIntermediateFuture<java.lang.String> subscribe()
subscribe
in interface ITimeService
protected static java.lang.String determineLocation()
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception