public void unregisterServant(String uri) throws CorbaHostException { targetHost.unregisterServant(uri); CorbanameURL details = new CorbanameURL(uri); if (SocketUtil.isLocalhost(details.getHost())) { releaseLocalNameServer(details.getPort()); } }
public void registerServant(String uri, Object serviceObject) throws CorbaHostException { getCorbaHost().registerServant(uri, serviceObject); }
public Object lookup(String uri) throws CorbaHostException { return getCorbaHost().lookup(uri); }
public void registerServant(String uri, Object servantObject) throws CorbaHostException { CorbanameURL details = new CorbanameURL(uri); if (SocketUtil.isLocalhost(details.getHost())) { createLocalNameServer(details.getPort()); } targetHost.registerServant(uri, servantObject); }
protected CorbaHost getCorbaHost() throws CorbaHostException { if (hosts.getCorbaHosts().isEmpty()) { throw new CorbaHostException("No registered CORBA hosts"); } return hosts.getCorbaHosts().get(0); }
/** * Creates corbaname URI basing on given parameters * @param host * @param port * @param name * * @return */ public static String createCorbanameURI(String host, int port, String name) { return new CorbanameURL(host, port, name).toString(); }
public void unregisterServant(String uri) throws CorbaHostException { getCorbaHost().unregisterServant(uri); }
/** * Translates corbaname URI to CorbanameDetails instances * * @param uri * @return */ public static CorbanameURL getServiceDetails(String uri) { CorbanameURL details = new CorbanameURL(uri); return details; }
private void handleException(Exception e) throws CorbaHostException { // The cause of the Exception is JDK specific if (e instanceof NotFound) { throw new CorbaHostException(CorbaHostException.NO_SUCH_OBJECT, e); } else if (e instanceof InvalidName) { throw new CorbaHostException(e); } else { throw new CorbaHostException(e); } }
public Object lookup(String uri) throws CorbaHostException { return targetHost.lookup(uri); }
public CorbanameURL(String host, int port, String namePath, String nameService) { super(); this.host = host == null ? DEFAULT_HOST : host; this.port = port <= 0 ? DEFAULT_PORT : port; this.namePath = parseName(namePath); this.nameService = nameService == null ? DEFAULT_NAME_SERVICE : nameService; }
public List<CorbaHost> getCorbaHosts() { loadHosts(); return corbaHosts; }
protected CorbaHost getCorbaHost() throws CorbaHostException { if (hosts.getCorbaHosts().isEmpty()) { throw new CorbaHostException("No registered CORBA hosts"); } return hosts.getCorbaHosts().get(0); }
/** * Creates corbaname URI basing on given parameters * @param host * @param port * @param name * * @return */ public static String createCorbanameURI(String host, int port, String name) { return new CorbanameURL(host, port, name).toString(); }
public void registerServant(String uri, Object serviceObject) throws CorbaHostException { getCorbaHost().registerServant(uri, serviceObject); }
public Object lookup(String uri) throws CorbaHostException { return getCorbaHost().lookup(uri); }
public void unregisterServant(String uri) throws CorbaHostException { getCorbaHost().unregisterServant(uri); }
/** * Translates corbaname URI to CorbanameDetails instances * * @param uri * @return */ public static CorbanameURL getServiceDetails(String uri) { CorbanameURL details = new CorbanameURL(uri); return details; }
public CorbanameURL(String host, int port, String namePath, String nameService) { super(); this.host = host == null ? DEFAULT_HOST : host; this.port = port <= 0 ? DEFAULT_PORT : port; this.namePath = parseName(namePath); this.nameService = nameService == null ? DEFAULT_NAME_SERVICE : nameService; }
public List<CorbaHost> getCorbaHosts() { loadHosts(); return corbaHosts; }