/** * Gets the default Provider URL. * Note: The old API needs to be used here in order to be compliant with products using Carol v2.x * @return the provider URL that is used by default. */ public String getProviderURL() { return org.objectweb.carol.util.configuration.ConfigurationRepository.getCurrentConfiguration().getProviderURL(); }
/** * {@inheritDoc} */ public String getDefaultProtocolName() { return ConfigurationRepository.getDefaultConfiguration().getName(); }
public String getNameInNamespace() throws NamingException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("LmiInitialContext.getNameInNamespace()"); } return "lmiContext"; }
/** * {@inheritDoc} */ public String getInitialContextFactoryName(String protocolName) { ProtocolConfiguration config = getProtocolConfiguration(protocolName); return config.getProtocol().getInitialContextFactoryClassName(); }
/** * Get a RMI environment with his architecture name * @return RMIConfiguration the environment, null if not existe */ public static RMIConfiguration getRMIConfiguration(String name) throws RMIConfigurationException { if (configurationLoaded) { return (RMIConfiguration) rmiConfigurationTable.get(name); } else { loadCarolConfiguration(); return (RMIConfiguration) rmiConfigurationTable.get(name); } }
/** * init the Carol configuration, * A server can call this static method * for instantiate the carol communication layer */ public static void init(LoggerFactory lf) throws RMIConfigurationException { // init Trace TraceCarol.configure(lf); new CarolConfiguration(); }
/** * @param protocolName parotocol name. * @return Returns the {@link Protocol} with the given name. */ private ProtocolConfiguration getProtocolConfiguration(String protocolName) { return ConfigurationRepository.getConfiguration(protocolName); }
/** * 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; } }
/** * Get all RMI environment * @return Hashtable the rmi configuration hashtable */ public static Hashtable getAllRMIConfiguration() throws RMIConfigurationException { if (configurationLoaded) { return rmiConfigurationTable; } else { loadCarolConfiguration(); return rmiConfigurationTable; } } /**
/** * 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 * Read the communication context */ public CarolConfiguration() throws RMIConfigurationException { if (!configurationLoaded) { loadCarolConfiguration(); } }
/** * Constructor, * load communication framework * and instaciate initial contexts */ public LmiInitialContext () throws NamingException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("LmiInitialContext.LmiInitialContext()"); } }
/** * 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 }
public NameParser getNameParser(String name) throws NamingException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("LmiInitialContext.getNameParser(\""+name+"\")"); } return lmiParser; }
/** * never use for the moment */ public Object getObjectInstance(Object ref, Name name, Context nameCtx, Hashtable env) throws NamingException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("MultiOrbInitialContextFactory.getObjectInstance(Object ref, Name name, Context nameCtx, Hashtable env)"); } // never use return null; } }
/** * 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 void close() throws NamingException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("LmiInitialContext.close()"); } }
/** * never use for the moment */ public Object getObjectInstance(Object ref, Name name, Context nameCtx, Hashtable env) throws NamingException { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("MultiOrbInitialContextFactory.getObjectInstance(Object ref, Name name, Context nameCtx, Hashtable env)"); } // never use return null; } }
/** * Method getCurrent * * @return NameServiceManager return the current * */ public static NameServiceManager getNSManagerCurrent() { if (TraceCarol.isDebugJndiCarol()) { TraceCarol.debugJndiCarol("NameServiceManager.getNSManagerCurrent()"); } return current ; }