Package com.fauna.event
Class EventSource
- java.lang.Object
-
- com.fauna.event.EventSource
-
public class EventSource extends java.lang.ObjectRepresents an event source. You can consume event sources as Event Feeds by callingFaunaClient.feed()or as Event Streams by callingFaunaClient.stream().The
EventSourceclass provides methods for constructing instances from event source tokens and responses
-
-
Constructor Summary
Constructors Constructor Description EventSource(java.lang.String token)Constructs a newEventSourcewith the specified token.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Compares thisEventSourcewith another object for equality.static EventSourcefromToken(java.lang.String token)Creates anEventSourcefrom the specified token.java.lang.StringgetToken()Retrieves the token for the event source.inthashCode()Returns the hash code for thisEventSource.
-
-
-
Method Detail
-
getToken
public java.lang.String getToken()
Retrieves the token for the event source.- Returns:
- A
Stringrepresenting the token.
-
fromToken
public static EventSource fromToken(java.lang.String token)
Creates anEventSourcefrom the specified token.- Parameters:
token- AStringrepresenting the token for the event source.- Returns:
- A new
EventSourceinstance.
-
equals
public boolean equals(java.lang.Object o)
Compares thisEventSourcewith another object for equality.- Overrides:
equalsin classjava.lang.Object- Parameters:
o- The object to compare with.- Returns:
trueif the specified object is equal to thisEventSource;falseotherwise.
-
hashCode
public int hashCode()
Returns the hash code for thisEventSource.- Overrides:
hashCodein classjava.lang.Object- Returns:
- An
intrepresenting the hash code of this object.
-
-