Package de.elo.ix.client
Interface EventBusApi
public interface EventBusApi
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the event handler.Returns aBus
object for the broadcast bus.getEventBus
(long busId) Returns aBus
object for the given bus ID.long
Returns the internally used subscriber ID.getUserBus
(int userId) Returns aBus
object for an user bus.void
IXConnection has performed a re-login.openEventBusChannel
(String channelId) This function opens an event bus for the given channel ID.openEventBusChannel
(String channelId, boolean noForwardToOtherIxs) This function opens an event bus for the given channel ID.void
Deprecated.The handler cannot be removed anymore.
-
Method Details
-
getSubscriberId
long getSubscriberId()Returns the internally used subscriber ID.- Returns:
- subscriber ID
-
addHandler
Adds the event handler. Only one Handler can be set.- Parameters:
evh
- Event handler
-
removeHandler
Deprecated.The handler cannot be removed anymore.Remove the given handler.- Parameters:
evh
- Event handler
-
openEventBusChannel
This function opens an event bus for the given channel ID.- Parameters:
channelId
- Either an arbitary ID used to create most likely uniqe bus ID. Or null, to create a random bus ID.- Returns:
- Bus object.
- Throws:
byps.RemoteException
-
openEventBusChannel
EventBusApi.Bus openEventBusChannel(String channelId, boolean noForwardToOtherIxs) throws byps.RemoteException This function opens an event bus for the given channel ID.- Parameters:
channelId
- Either an arbitary ID used to create most likely uniqe bus ID. Or null, to create a random bus ID.noForwardToOtherIxs
- Set this parameter as true, if the messages sent on this bus should not be forwarded to other Indexserver instances. A value of true makes sense, if no other client applications are interested in messages on this bus.- Returns:
- Bus object.
- Throws:
byps.RemoteException
-
getEventBus
Returns aBus
object for the given bus ID.- Parameters:
busId
- Event bus ID.- Returns:
- Bus object.
- See Also:
-
getBroadcastBus
EventBusApi.Bus getBroadcastBus()Returns aBus
object for the broadcast bus.- Returns:
- Bus object.
-
getUserBus
Returns aBus
object for an user bus.- Parameters:
userId
- User ID.- Returns:
- Bus object.
-
onRelogin
void onRelogin()IXConnection has performed a re-login. This method is internally called. Do not call it directly.
-