|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jabber.jabberbeans.PacketRebroadcaster
PacketRebroadcaster
is a class used by the optional beans to
allow for subscriptions to 'filtered' interfaces. By using this class and
overriding the PacketListener members, you can filter for a packet that
meets specific requirements.
Known issues:
Constructor Summary | |
PacketRebroadcaster()
|
Method Summary | |
void |
addPacketListener(PacketListener l)
addPacketListener registers a packet listener with our
filtered packet rebroadcaster. |
void |
delPacketListener(PacketListener l)
delPacketListener unregisters a packet listener with our
filtered packet rebroadcaster. |
protected void |
fireReceived(PacketEvent p)
fireReceived is called by the PacketListener-derived
ReceivedPacket. |
protected void |
fireSendFailed(PacketEvent p)
fireSendFailed is called by the PacketListener-derived
SentPacket. |
protected void |
fireSent(PacketEvent p)
fireSent is called by the PacketListener-derived
SentPacket. |
abstract void |
receivedPacket(PacketEvent pe)
PacketListener element |
void |
registerListener(ConnectionBean cb)
registerListener registers the listener with the connection
bean, so that it will receive events. |
abstract void |
sendFailed(PacketEvent pe)
PacketListener element |
abstract void |
sentPacket(PacketEvent pe)
PacketListener element |
void |
unregisterListener(ConnectionBean cb)
unregisterListener unregisters the listener with the
connection bean, so that it will no longer receive events. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PacketRebroadcaster()
Method Detail |
public void registerListener(ConnectionBean cb)
registerListener
registers the listener with the connection
bean, so that it will receive events.
cb
- a ConnectionBean
valuepublic void unregisterListener(ConnectionBean cb)
unregisterListener
unregisters the listener with the
connection bean, so that it will no longer receive events.
cb
- a ConnectionBean
valuepublic abstract void receivedPacket(PacketEvent pe)
receivedPacket
in interface PacketListener
pe
- a PacketEvent
valuepublic abstract void sentPacket(PacketEvent pe)
sentPacket
in interface PacketListener
pe
- a PacketEvent
valuepublic abstract void sendFailed(PacketEvent pe)
sendFailed
in interface PacketListener
pe
- a PacketEvent
valuepublic final void addPacketListener(PacketListener l)
addPacketListener
registers a packet listener with our
filtered packet rebroadcaster.
addPacketListener
in interface PacketListenerRegistrar
l
- a PacketListener
valuepublic final void delPacketListener(PacketListener l)
delPacketListener
unregisters a packet listener with our
filtered packet rebroadcaster.
delPacketListener
in interface PacketListenerRegistrar
l
- a PacketListener
valueprotected final void fireReceived(PacketEvent p)
fireReceived
is called by the PacketListener-derived
ReceivedPacket. It sends the same packet out to everyone registered to
this rebroadcaster.
p
- a PacketEvent
valueprotected final void fireSent(PacketEvent p)
fireSent
is called by the PacketListener-derived
SentPacket. It sends the same packet out to everyone registered to
this rebroadcaster.
p
- a PacketEvent
valueprotected final void fireSendFailed(PacketEvent p)
fireSendFailed
is called by the PacketListener-derived
SentPacket. It sends the same packet out to everyone registered to
this rebroadcaster.
p
- a PacketEvent
value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |