Package io.vertx.ext.consul
Class Event
- java.lang.Object
-
- io.vertx.ext.consul.Event
-
public class Event extends Object
Holds properties of Consul event- Author:
- Ruslan Sennov
-
-
Constructor Summary
Constructors Constructor Description Event()
Default constructorEvent(JsonObject json)
Constructor from JSONEvent(Event other)
Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getId()
Get ID of eventint
getLTime()
Get the Lamport clock timeString
getName()
Get name of eventString
getNode()
Get regular expression to filter by node nameString
getPayload()
Get payload of eventString
getService()
Get regular expression to filter by serviceString
getTag()
Get regular expression to filter by tagint
getVersion()
Get versionint
hashCode()
Event
setId(String id)
Set ID of eventEvent
setLTime(int lTime)
Set the Lamport clock timeEvent
setName(String name)
Set name of eventEvent
setNode(String node)
Set regular expression to filter by node nameEvent
setPayload(String payload)
Set payload of eventEvent
setService(String service)
Set regular expression to filter by serviceEvent
setTag(String tag)
Set regular expression to filter by tagEvent
setVersion(int version)
Set versionJsonObject
toJson()
Convert to JSON
-
-
-
Constructor Detail
-
Event
public Event()
Default constructor
-
Event
public Event(Event other)
Copy constructor- Parameters:
other
- the one to copy
-
Event
public Event(JsonObject json)
Constructor from JSON- Parameters:
json
- the JSON
-
-
Method Detail
-
toJson
public JsonObject toJson()
Convert to JSON- Returns:
- the JSON
-
getId
public String getId()
Get ID of event- Returns:
- ID of event
-
setId
public Event setId(String id)
Set ID of event- Parameters:
id
- ID of event- Returns:
- reference to this, for fluency
-
getName
public String getName()
Get name of event- Returns:
- event name
-
setName
public Event setName(String name)
Set name of event- Parameters:
name
- name of event- Returns:
- reference to this, for fluency
-
getPayload
public String getPayload()
Get payload of event- Returns:
- payload
-
setPayload
public Event setPayload(String payload)
Set payload of event- Parameters:
payload
- payload of event- Returns:
- reference to this, for fluency
-
getNode
public String getNode()
Get regular expression to filter by node name- Returns:
- regular expression to filter by node name
-
setNode
public Event setNode(String node)
Set regular expression to filter by node name- Parameters:
node
- regular expression to filter by node name- Returns:
- reference to this, for fluency
-
getService
public String getService()
Get regular expression to filter by service- Returns:
- regular expression to filter by service
-
setService
public Event setService(String service)
Set regular expression to filter by service- Parameters:
service
- regular expression to filter by service- Returns:
- reference to this, for fluency
-
getTag
public String getTag()
Get regular expression to filter by tag- Returns:
- regular expression to filter by tag
-
setTag
public Event setTag(String tag)
Set regular expression to filter by tag- Parameters:
tag
- regular expression to filter by tag- Returns:
- reference to this, for fluency
-
getVersion
public int getVersion()
Get version- Returns:
- version
-
setVersion
public Event setVersion(int version)
Set version- Parameters:
version
- version- Returns:
- reference to this, for fluency
-
getLTime
public int getLTime()
Get the Lamport clock time- Returns:
- the Lamport clock time
-
setLTime
public Event setLTime(int lTime)
Set the Lamport clock time- Parameters:
lTime
- the Lamport clock time- Returns:
- reference to this, for fluency
-
-