File |
Line |
nl/tudelft/simulation/naming/context/JvmContext.java |
418 |
nl/tudelft/simulation/naming/context/RemoteContext.java |
274 |
}
/** {@inheritDoc} */
@Override
public void fireObjectChangedEventValue(final Object object)
throws NameNotFoundException, NullPointerException, NamingException, RemoteException
{
Throw.whenNull(object, "object cannot be null");
fireObjectChangedEventKey(makeObjectKey(object));
}
/** {@inheritDoc} */
@Override
public void fireObjectChangedEventKey(final String key)
throws NameNotFoundException, NullPointerException, NamingException, RemoteException
{
Throw.whenNull(key, "key cannot be null");
Throw.when(key.length() == 0 || key.contains(ContextInterface.SEPARATOR), NamingException.class,
"key [%s] is the empty string or key contains '/'", key);
if (!hasKey(key))
{
throw new NameNotFoundException("Could not find object with key " + key + " for fireObjectChangedEvent");
}
try
{ |
File |
Line |
nl/tudelft/simulation/naming/context/event/ContextEventProducerImpl.java |
127 |
nl/tudelft/simulation/naming/context/event/ContextEventProducerImpl.java |
145 |
context.addListener(this, ContextInterface.OBJECT_CHANGED_EVENT);
}
for (Entry<String, PatternListener> entry : this.regExpListenerMap.entrySet())
{
String path = (String) content[0] + ContextInterface.SEPARATOR + (String) content[1];
if (entry.getValue().getPattern().matcher(path).matches())
{
entry.getValue().getListener().notify(event);
}
}
}
else if (event.getType().equals(ContextInterface.OBJECT_REMOVED_EVENT)) |