Package com.fauna.event
Class EventSource
- java.lang.Object
-
- com.fauna.event.EventSource
-
public class EventSource extends java.lang.Object
Represents an event source. You can consume event sources as Event Feeds by callingFaunaClient.feed()
or as Event Streams by callingFaunaClient.stream()
.The
EventSource
class provides methods for constructing instances from event source tokens and responses
-
-
Constructor Summary
Constructors Constructor Description EventSource(java.lang.String token)
Constructs a newEventSource
with the specified token.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Compares thisEventSource
with another object for equality.static EventSource
fromToken(java.lang.String token)
Creates anEventSource
from the specified token.java.lang.String
getToken()
Retrieves the token for the event source.int
hashCode()
Returns the hash code for thisEventSource
.
-
-
-
Method Detail
-
getToken
public java.lang.String getToken()
Retrieves the token for the event source.- Returns:
- A
String
representing the token.
-
fromToken
public static EventSource fromToken(java.lang.String token)
Creates anEventSource
from the specified token.- Parameters:
token
- AString
representing the token for the event source.- Returns:
- A new
EventSource
instance.
-
equals
public boolean equals(java.lang.Object o)
Compares thisEventSource
with another object for equality.- Overrides:
equals
in classjava.lang.Object
- Parameters:
o
- The object to compare with.- Returns:
true
if the specified object is equal to thisEventSource
;false
otherwise.
-
hashCode
public int hashCode()
Returns the hash code for thisEventSource
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- An
int
representing the hash code of this object.
-
-