er.extensions.foundation
Class ERXRemoteNotificationCenter
java.lang.Object
com.webobjects.foundation.NSNotificationCenter
er.extensions.foundation.ERXRemoteNotificationCenter
- Direct Known Subclasses:
- ERJGroupsNotificationCenter
public abstract class ERXRemoteNotificationCenter
- extends com.webobjects.foundation.NSNotificationCenter
NSNotificationCenter that can post simple notifications to other
applications. Currently just posts the name, no object and the userInfo as a
dictionary of strings. You must specifically register observers and post notifications here, not at
NSNotificationCenter.defaultCenter()
.
If you don't link ERJGroupsSynchronizer, it will create a simple implementation, which posts via
multicast - and is thus not really reliable and can't handle larger useInfo dict
(of which keys and values must be strings). Also, you need to explicitely send the
notification locally if you want to receive it in the sending application.
- Author:
- ak
Properties |
er.extensions.ERXRemoteNotificationCenter.localBindAddress | the local address to bind to |
er.extensions.ERXRemoteNotificationCenter.group | the multicast address to send to (230.0.0.1) |
er.extensions.ERXRemoteNotificationCenter.port | the multicast port to send to (9754) |
er.extensions.ERXRemoteNotificationCenter.maxPacketSize | the maximum multicast packet size (1024) |
er.extensions.ERXRemoteNotificationCenter.identifier | the unique identifier for this host (autogenerated by default) |
Fields inherited from class com.webobjects.foundation.NSNotificationCenter |
_CLASS |
Methods inherited from class com.webobjects.foundation.NSNotificationCenter |
_getEntry, addObserver, addOmniscientObserver, postNotification, postNotification, removeObserver, removeObserver, removeOmniscientObserver, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ERXRemoteNotificationCenter
public ERXRemoteNotificationCenter()
defaultCenter
public static ERXRemoteNotificationCenter defaultCenter()
setDefaultCenter
public static void setDefaultCenter(ERXRemoteNotificationCenter center)
- Set the default center
- Parameters:
center
-
postLocalNotification
public void postLocalNotification(com.webobjects.foundation.NSNotification notification)
- Post a notification to the local app only.
- Parameters:
notification
-
postRemoteNotification
protected abstract void postRemoteNotification(com.webobjects.foundation.NSNotification notification)
- Post a notification to the remote listeners.
- Parameters:
notification
-
postNotification
public void postNotification(com.webobjects.foundation.NSNotification notification)
- Overridden to call
postRemoteNotification(NSNotification)
.
- Overrides:
postNotification
in class com.webobjects.foundation.NSNotificationCenter
Copyright © 2002 – 2007 Project Wonder.