Class DiscoveryInfo
- java.lang.Object
-
- jadex.bridge.service.types.awareness.DiscoveryInfo
-
public class DiscoveryInfo extends java.lang.Object
Local information about discovered platforms.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<TransportAddress>
addresses
The transport addresses of the remote component.protected IComponentIdentifier
cid
The component identifier of the remote component.protected java.util.Map<java.lang.String,java.lang.String>
properties
Platform properties (if any).protected IFuture<IComponentIdentifier>
proxy
Component id of local proxy (if any).protected boolean
remoteexcluded
Flag indicating that the remote component has excluded our local component.protected java.util.Map<java.lang.String,long[]>
timedelays
The current send delay time.
-
Constructor Summary
Constructors Constructor Description DiscoveryInfo()
Create a new discovery info.DiscoveryInfo(IComponentIdentifier cid, java.util.List<TransportAddress> addresses, IFuture<IComponentIdentifier> proxy, boolean remoteexcluded, java.util.Map<java.lang.String,java.lang.String> properties)
Create a new discovery info.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Test for equality.java.util.List<TransportAddress>
getAddresses()
Gets the addresses.IComponentIdentifier
getComponentIdentifier()
Get the component identifier.long
getDelay()
Get the time.long
getDelay(java.lang.String src)
Get the time.long[]
getMaxEntry()
Get the time.java.util.Map<java.lang.String,java.lang.String>
getProperties()
Get the properties.IFuture<IComponentIdentifier>
getProxy()
Get the proxy.long
getTime()
Get the time.long
getTime(java.lang.String src)
Get the time.java.util.Map<java.lang.String,long[]>
getTimeDelays()
Get the delays.int
hashCode()
Get the hashcode.boolean
isAlive()
Check, if the platform is still alive.boolean
isRemoteExcluded()
Is the local platform excluded by the remote platform?void
removeTimeDelay(java.lang.String src)
Remove a time support.void
setAddresses(java.util.List<TransportAddress> addresses)
Sets the addresses.void
setComponentIdentifier(IComponentIdentifier componentIdentifier)
Set the component identifier.void
setDelays(java.util.Map<java.lang.String,long[]> timedelays)
Set the delays.void
setProperties(java.util.Map<java.lang.String,java.lang.String> props)
Set the properties.void
setProxy(IFuture<IComponentIdentifier> proxy)
Set the proxy.void
setRemoteExcluded(boolean remoteexcluded)
Set the remote excluded flag.void
setTimeDelay(java.lang.String src, long time, long delay)
Add a new time support.java.lang.String
toString()
Get the string representation.
-
-
-
Field Detail
-
cid
protected IComponentIdentifier cid
The component identifier of the remote component.
-
addresses
protected java.util.List<TransportAddress> addresses
The transport addresses of the remote component.
-
proxy
protected IFuture<IComponentIdentifier> proxy
Component id of local proxy (if any).
-
timedelays
protected java.util.Map<java.lang.String,long[]> timedelays
The current send delay time.
-
remoteexcluded
protected boolean remoteexcluded
Flag indicating that the remote component has excluded our local component.
-
properties
protected java.util.Map<java.lang.String,java.lang.String> properties
Platform properties (if any).
-
-
Constructor Detail
-
DiscoveryInfo
public DiscoveryInfo()
Create a new discovery info.
-
DiscoveryInfo
public DiscoveryInfo(IComponentIdentifier cid, java.util.List<TransportAddress> addresses, IFuture<IComponentIdentifier> proxy, boolean remoteexcluded, java.util.Map<java.lang.String,java.lang.String> properties)
Create a new discovery info.
-
-
Method Detail
-
getComponentIdentifier
public IComponentIdentifier getComponentIdentifier()
Get the component identifier.- Returns:
- the component identifier.
-
setComponentIdentifier
public void setComponentIdentifier(IComponentIdentifier componentIdentifier)
Set the component identifier.- Parameters:
component
- identifier The component identifier to set.
-
getAddresses
public java.util.List<TransportAddress> getAddresses()
Gets the addresses.- Returns:
- The addresses.
-
setAddresses
public void setAddresses(java.util.List<TransportAddress> addresses)
Sets the addresses.- Parameters:
addresses
- The addresses.
-
getProxy
public IFuture<IComponentIdentifier> getProxy()
Get the proxy.- Returns:
- the proxy.
-
setProxy
public void setProxy(IFuture<IComponentIdentifier> proxy)
Set the proxy.- Parameters:
proxy
- The proxy to set.
-
getTime
public long getTime()
Get the time.- Returns:
- the time.
-
getMaxEntry
public long[] getMaxEntry()
Get the time.- Returns:
- the time.
-
getDelay
public long getDelay()
Get the time.- Returns:
- the time.
-
getDelay
public long getDelay(java.lang.String src)
Get the time.- Returns:
- the time.
-
getTime
public long getTime(java.lang.String src)
Get the time.- Returns:
- the time.
-
setTimeDelay
public void setTimeDelay(java.lang.String src, long time, long delay)
Add a new time support.
-
removeTimeDelay
public void removeTimeDelay(java.lang.String src)
Remove a time support.
-
getTimeDelays
public java.util.Map<java.lang.String,long[]> getTimeDelays()
Get the delays.- Returns:
- The delays.
-
setDelays
public void setDelays(java.util.Map<java.lang.String,long[]> timedelays)
Set the delays.- Parameters:
delays
- The delays to set.
-
isRemoteExcluded
public boolean isRemoteExcluded()
Is the local platform excluded by the remote platform?- Returns:
- The remote excluded flag.
-
setRemoteExcluded
public void setRemoteExcluded(boolean remoteexcluded)
Set the remote excluded flag.- Parameters:
remoteexcluded
- Is the local platform excluded by the remote platform?
-
getProperties
public java.util.Map<java.lang.String,java.lang.String> getProperties()
Get the properties.- Returns:
- The properties, if any.
-
setProperties
public void setProperties(java.util.Map<java.lang.String,java.lang.String> props)
Set the properties.- Parameters:
props
- The properties.
-
hashCode
public int hashCode()
Get the hashcode.- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Test for equality.- Overrides:
equals
in classjava.lang.Object
-
isAlive
public boolean isAlive()
Check, if the platform is still alive. The liveness is calculated based on current time and delay and last received update.
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toString
in classjava.lang.Object
-
-