public void addNamingListener(EventContext context, Name target, int scope, NamingListener l) throws NamingException, RemoteException { edelegate.addNamingListener(context, target, scope, l); } public void removeNamingListener(NamingListener l) throws NamingException,
public void removeNamingListener(NamingListener l) throws NamingException, RemoteException { edelegate.removeNamingListener(l); } public boolean targetMustExist() throws NamingException, RemoteException
public boolean targetMustExist() throws NamingException, RemoteException { return edelegate.targetMustExist(); } }
public boolean targetMustExist() throws NamingException { if((naming instanceof NamingEvents) == false) { throw new UnsupportedOperationException("Naming implementation does not support NamingExt"); } NamingEvents next = (NamingEvents) naming; boolean targetMustExist = true; try { targetMustExist = next.targetMustExist(); } catch (RemoteException e) { CommunicationException ce = new CommunicationException("removeNamingListener failed"); ce.initCause(e); } return targetMustExist; } // End EventContext methods
public void removeNamingListener(NamingListener l) throws NamingException { if((naming instanceof NamingEvents) == false) { throw new UnsupportedOperationException("Naming implementation does not support NamingExt"); } NamingEvents next = (NamingEvents) naming; try { next.removeNamingListener(l); } catch (RemoteException e) { CommunicationException ce = new CommunicationException("removeNamingListener failed"); ce.initCause(e); } }
public void addNamingListener(Name target, int scope, NamingListener l) throws NamingException { if((naming instanceof NamingEvents) == false) { Class<?> cls = naming.getClass(); String cs = cls.getName() + ", CS:"+ cls.getProtectionDomain().getCodeSource().toString(); throw new UnsupportedOperationException("Naming implementation does not support NamingExt, : "+cs); } NamingEvents next = (NamingEvents) naming; try { next.addNamingListener(this, target, scope, l); } catch (RemoteException e) { CommunicationException ce = new CommunicationException("addNamingListener failed"); ce.initCause(e); } }