public interface Channel
| Modifier and Type | Method and Description |
|---|---|
void |
addHandler(EventStreamHandler handler)
Adds a handler for transmitting events to the channel.
|
void |
attach(ChannelConnection connection)
Attach a connection to the channel so that it can flow events.
|
void |
attach(EventStreamHandler handler)
Attach a single handler to the channel so that it can flow events.
|
ChannelSide |
getChannelSide()
Returns if the Channel receives producer events or sends events to consumers.
|
java.net.URI |
getContributionUri()
Returns the URI of the contribution this channel was deployed with.
|
java.lang.Object |
getDirectConnection(java.lang.String topic)
Returns a direct connection to the channel, typically the dispatcher such as a ring buffer.
|
java.net.URI |
getUri()
Returns the channel URI.
|
void |
removeHandler(EventStreamHandler handler)
Removes a handler.
|
void |
start()
Initializes the channel to receive events.
|
void |
stop()
Stops the channel and prepares it for un-deployment
|
void |
subscribe(java.net.URI uri,
ChannelConnection connection)
Subscribe to receive events from the channel.
|
ChannelConnection |
unsubscribe(java.net.URI uri,
java.lang.String topic)
Unsubscribe from receiving events from the channel
|
java.net.URI getUri()
java.net.URI getContributionUri()
void start()
void stop()
void addHandler(EventStreamHandler handler)
handler - the handlervoid removeHandler(EventStreamHandler handler)
handler - the handlervoid attach(EventStreamHandler handler)
handler - the handler to attachvoid attach(ChannelConnection connection)
connection - the connection to attachvoid subscribe(java.net.URI uri,
ChannelConnection connection)
uri - the URI identifying the subscriptionconnection - the connection to receive events onChannelConnection unsubscribe(java.net.URI uri, java.lang.String topic)
uri - the subscription URItopic - the topic; may be nullChannelSide getChannelSide()
java.lang.Object getDirectConnection(java.lang.String topic)
topic - the topic; may be null