public String getNameInNamespace() throws NamingException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("LmiInitialContext.getNameInNamespace()"); } return "lmiContext"; }
/** * set port method, set the port for the name service * @param int port number */ public void setPort(int p) { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("JeremieRegistry.setPort("+p+")"); } if (p!= 0) { port = p; } }
/** * set port method, set the port for the name service * @param int port */ public void setPort(int p) { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("CmiRegistry.setPort(" + p + ")"); } if (p != 0) { this.port = p; } }
/** * start Method, Start a new NameService or do nothing if the name service is all ready start * @param int port is port number * @throws NameServiceException if a problem occure */ public void start() throws NameServiceException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("LMIRegistry.start() on port:" + port); } // do nothing }
/** * set port method, set the port for the name service * @param int port number */ public void setPort(int p) { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("IIOPCosNaming.setPort("+p+")"); } if (p!= 0) { port = p; } }
/** * Constructor, * load communication framework * and instaciate initial contexts */ public LmiInitialContext () throws NamingException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("LmiInitialContext.LmiInitialContext()"); } }
public NameParser getNameParser(String name) throws NamingException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("LmiInitialContext.getNameParser(\""+name+"\")"); } return lmiParser; }
public Object removeFromEnvironment(String propName) throws NamingException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("LmiInitialContext.removeFromEnvironment(\""+propName+"\")"); } if (lmiEnv == null) return null; return lmiEnv.remove(propName); } public Hashtable getEnvironment() throws NamingException {
/** * stop Method, Stop a NameService or do nothing if the name service is all ready stop * @throws NameServiceException if a problem occure */ public void stop() throws NameServiceException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("LMIRegistry.stop()"); } // do nothing }
public Object addToEnvironment(String propName, Object propVal) throws NamingException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("LmiInitialContext.addToEnvironment(\""+propName+"\","+simpleClass(propVal.getClass().getName())+" object)"); } if (lmiEnv == null) { lmiEnv = new Hashtable(); } return lmiEnv.put(propName, propVal); }
public void unbind(String name) throws NamingException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("LmiInitialContext.unbind(\""+name+"\")"); } if (name.equals("")) { throw new InvalidNameException("Cannot unbind empty name"); } bindings.remove(name); }
public void rename(String oldName, String newName) throws NamingException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("LmiInitialContext.rename(\""+oldName+"\",\""+newName+"\")"); } if (oldName.equals("") || newName.equals("")) throw new InvalidNameException("Cannot rename empty name"); if (bindings.get(newName) != null) throw new NameAlreadyBoundException(newName + " is already bound"); Object oldb = bindings.remove(oldName); if (oldb == null) throw new NameNotFoundException(oldName + " not bound"); bindings.put(newName, oldb); }
/** * Get a new multi initial context * @return the new Multi Initial Context * */ public Context getInitialContext(Hashtable env) throws NamingException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("MultiOrbInitialContextFactory.getInitialContext(Hashtable env)"); } return new MultiOrbInitialContext(); }
public String composeName(String name, String prefix) throws NamingException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("MultiOrbInitialContext.composeName("+name+","+prefix+")/rmi name="+pcur.getCurrentRMIName()); } return name; }
public void rebind(String name, Object obj) throws NamingException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("LmiInitialContext.rebind(\""+name+"\","+simpleClass(obj.getClass().getName())+" object)"); } if (name.equals("")) { throw new InvalidNameException("Cannot bind empty name"); } bindings.put(name, encodeObject(obj)); }
public Object lookupLink(String name) throws NamingException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("LmiInitialContext.lookupLink(\""+name+"\")"); } return lookup(name); }
public void bind(String name, Object obj) throws NamingException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("LmiInitialContext.bind(\""+name+"\","+simpleClass(obj.getClass().getName())+" object)"); } if (name.equals("")) { throw new InvalidNameException("Cannot bind empty name"); } if (bindings.get(name) != null) { throw new NameAlreadyBoundException("Use rebind to override"); } bindings.put(name, encodeObject(obj)); }
public String composeName(String name, String prefix) throws NamingException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("LmiInitialContext.composeName("+name+","+prefix+")"); } Name result = composeName(new CompositeName(name), new CompositeName(prefix)); return result.toString(); }
public Name composeName(Name name, Name prefix) throws NamingException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("LmiInitialContext.composeName("+name+","+prefix+")"); } Name result = (Name)(prefix.clone()); result.addAll(name); return result; }
public Name composeName(Name name, Name prefix) throws NamingException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("MultiOrbInitialContext.composeName(\""+name+","+prefix+"\")/rmi name=\""+pcur.getCurrentRMIName()+"\""); } return pcur.getCurrentInitialContext().composeName(name, prefix); }