Project Wonder 5.0

er.extensions.foundation
Class ERXRemoteNotificationCenter

java.lang.Object
  extended by com.webobjects.foundation.NSNotificationCenter
      extended by 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)
           

Field Summary
 
Fields inherited from class com.webobjects.foundation.NSNotificationCenter
_CLASS
 
Constructor Summary
ERXRemoteNotificationCenter()
           
 
Method Summary
static ERXRemoteNotificationCenter defaultCenter()
           
 void postLocalNotification(com.webobjects.foundation.NSNotification notification)
          Post a notification to the local app only.
 void postNotification(com.webobjects.foundation.NSNotification notification)
          Overridden to call postRemoteNotification(NSNotification).
protected abstract  void postRemoteNotification(com.webobjects.foundation.NSNotification notification)
          Post a notification to the remote listeners.
static void setDefaultCenter(ERXRemoteNotificationCenter center)
          Set the default center
 
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
 

Constructor Detail

ERXRemoteNotificationCenter

public ERXRemoteNotificationCenter()
Method Detail

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

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.