All Packages Class Hierarchy This Package Previous Next Index
Class iBus.layers.LOCALBUS
java.lang.Object
|
+----iBus.ProtocolObject
|
+----iBus.layers.LOCALBUS
- public class LOCALBUS
- extends ProtocolObject
LOCALBUS: protocol object for local communication within one virtual
machine.
This is a protocol object to accommodate Java Applets that want to
exchange events within one virtual machine or Web browser. This allows
one to use iBus much like the Kona InfoBus (TM).
LOCALBUS does not send or receive data via a network.
POSITION IN STACK:
-
LOCALBUS typically is the sole protocol object of a stack. Any
protocol object beneath is ignored. You can place protocol objects
atop LOCALBUS, however.
EVENTS PRODUCED:
EVENTS HANDLED:
EVENTS CONSUMED:
-
dnPush MessageEvents that have no local subscriber
-
LOCALBUS()
- Creates a protocol object and assigns a name to it.
-
dnPush(iBusURL, MessageEvent)
- Called by the object above to send a message to a channel by
multicast or unicast communication, depending on the channel URL:
-
dnSubscribe(iBusURL)
- Called by the object above to subscribe to a channel.
-
dnUnsubscribe(iBusURL)
- Called by the object above or by an iBus application to unsubscribe
from a certain channel.
LOCALBUS
public LOCALBUS()
- Creates a protocol object and assigns a name to it.
dnPush
public synchronized void dnPush(iBusURL channel,
MessageEvent msg) throws CommException, NotRegistered
- Called by the object above to send a message to a channel by
multicast or unicast communication, depending on the channel URL:
- Parameters:
- channel - the destination channel of the posting
- msg - the message to be sent
- Throws: CommException
- on communication failure
- Throws: NotRegistered
- in case registerTalker was not called for
the channel
- Overrides:
- dnPush in class ProtocolObject
dnSubscribe
public synchronized void dnSubscribe(iBusURL channel) throws AlreadySubscribed, CommException
- Called by the object above to subscribe to a channel.
- Parameters:
- channel - the channel to subscribe to
- Throws: AlreadySubscribed
- if this stack is already
subscribed to the channel
- Throws: CommException
- in case of a communication
error
- Overrides:
- dnSubscribe in class ProtocolObject
dnUnsubscribe
public synchronized void dnUnsubscribe(iBusURL channel) throws NotSubscribed, CommException
- Called by the object above or by an iBus application to unsubscribe
from a certain channel.
- Parameters:
- channel - the channel to unsubscribe from
- Throws: NotSubscribed
- if this stack is not subscribed
to the channel
- Throws: CommException
- in case of a communication
error
- Overrides:
- dnUnsubscribe in class ProtocolObject
All Packages Class Hierarchy This Package Previous Next Index