List of usage examples for java.rmi RemoteException RemoteException
public RemoteException(String s, Throwable cause)
From source file:com.silverpeas.tags.navigation.FilArianeTag.java
/** * Construction de l'url de l'item.//from w w w . j a v a2 s . c om * @param node * @return * @throws RemoteException */ private String generateFullSemanticPath(NodeDetail node) throws RemoteException { try { // TODO use prefix id return LinkGeneratorFactory.getInstance().newLinkGenerator().generateFullSemanticPath(pageContext, themetracker, node, idsTopicsRoots, null, getPrefixIdByLevelAndRoot(node)); } catch (Exception e) { throw new RemoteException("", e); } }
From source file:edu.clemson.cs.nestbed.server.management.configuration.ProgramProfilingSymbolManagerImpl.java
public void deleteProfilingSymbol(int symbolID) throws RemoteException { try {//w w w .jav a 2s. com log.info("Request to delete ProgramProfilingSymbol with id: " + symbolID); ProgramProfilingSymbol profilingSymbol = progProfSymbolAdapter.deleteProfilingSymbol(symbolID); writeLock.lock(); try { progProfSymbols.remove(profilingSymbol.getID()); } finally { writeLock.unlock(); } notifyObservers(Message.DELETE_SYMBOL, profilingSymbol); } catch (AdaptationException ex) { throw new RemoteException("AdaptationException", ex); } catch (Exception ex) { String msg = "Exception in deleteProfilingSymbol"; log.error(msg, ex); throw new RemoteException(msg, ex); } }
From source file:edu.clemson.cs.nestbed.server.management.configuration.MoteDeploymentConfigurationManagerImpl.java
public void deleteMoteDeploymentConfiguration(int id) throws RemoteException { try {// w w w . j av a2s. c o m log.info("Deleting mote deployment configuration with id: " + id); MoteDeploymentConfiguration mdc = null; writeLock.lock(); try { mdc = moteDepConfigAdapter.deleteMoteDeploymentConfiguration(id); moteDepConfigs.remove(mdc.getID()); } finally { writeLock.unlock(); } notifyObservers(Message.DELETE_CONFIG, mdc); } catch (AdaptationException ex) { throw new RemoteException("AdaptationException", ex); } catch (Exception ex) { String msg = "Exception in deleteMoteDeploymentConfiguration"; log.error(msg, ex); throw new RemoteException(msg, ex); } }
From source file:com.edmunds.etm.netscaler.NetScalerLoadBalancer.java
@Override public synchronized HostAddress createVirtualServer(VirtualServer server, VirtualServerConfig virtualServerConfig, HttpMonitor httpMonitor) throws VirtualServerExistsException, RemoteException { if (httpMonitor != null) { final NsMonitor monitor = new NsMonitor(); monitor.setMonitorName(getMonitorName(server.getName())); monitor.setType(NsMonitorType.HTTP_ECV); monitor.setSendString(httpMonitor.getHttpRequest()); monitor.setReceiveString(httpMonitor.getHttpResponse()); try {// w w w . j a va 2 s . c om nitroService.getMonitors().create(monitor); } catch (NitroExceptionResourceExists e) { log.warn("Monitor already exists: " + server.getName(), e); } catch (NitroException e) { throw new RemoteException("Create Monitor Failed", e); } } final OrderedInet4Address address = addressPool.issueAddress(); final NsVirtualServer nvs = new NsVirtualServer(); nvs.setName(server.getName()); nvs.setIpV46(address.toString()); nvs.setLbMethod(LbMethod.LEASTCONNECTION); nvs.setPort(virtualServerConfig.getPort()); nvs.setServiceType(NsServiceType.HTTP); try { nitroService.getVirtualServers().create(nvs); } catch (NitroExceptionResourceExists e) { throw new VirtualServerExistsException("Virtual Server Exists: " + server.getName(), e); } catch (NitroException e) { throw new RemoteException("Create Virtual Server Failed", e); } for (PoolMember poolMember : server.getPoolMembers()) { try { addPoolMember(server.getName(), poolMember); } catch (PoolMemberExistsException e) { } } return new HostAddress(address.toString(), virtualServerConfig.getPort()); }
From source file:com.silverpeas.tags.navigation.PageListeTag.java
/** * Construction de l'url de l'item.// w w w.ja va 2 s . com * @param node * @param number * @return * @throws RemoteException */ private String generateFullSemanticPath(NodeDetail node, PublicationDetail pub, int number) throws RemoteException { try { return LinkGeneratorFactory.getInstance().newLinkGenerator().generateFullSemanticPath(pageContext, themetracker, node, idTopicRoot, pub, null) + "-" + number; } catch (Exception e) { throw new RemoteException("", e); } }
From source file:edu.clemson.cs.nestbed.server.management.deployment.ProgramDeploymentManagerImpl.java
public void deployConfiguration(int configID) throws RemoteException { List<MoteDeploymentConfiguration> moteDeploymentConfigs; try {/*from w w w .ja v a 2s . c o m*/ moteDeploymentConfigs = MoteDeploymentConfigurationManagerImpl.getInstance() .getMoteDeploymentConfigurations(configID); for (MoteDeploymentConfiguration i : moteDeploymentConfigs) { StringBuffer output; Mote mote; MoteType type; MoteTestbedAssignment mtba; output = new StringBuffer(); mote = MoteManagerImpl.getInstance().getMote(i.getMoteID()); type = MoteTypeManagerImpl.getInstance().getMoteType(mote.getMoteTypeID()); mtba = MoteTestbedAssignmentManagerImpl.getInstance().getMoteTestbedAssignment(mote.getID()); log.info("Installing\n" + " program: " + i.getProgramID() + "\n" + " on mote: " + mote.getID() + "\n" + " type: " + type.getName() + "\n" + " address: " + mtba.getMoteAddress()); installProgramInternal(mtba.getMoteAddress(), mote.getMoteSerialID(), type.getTosPlatform(), i.getProgramID(), output); } } catch (RemoteException ex) { throw ex; } catch (Exception ex) { String msg = "Exception in deployConfiguration"; log.error(msg, ex); throw new RemoteException(msg, ex); } }
From source file:edu.clemson.cs.nestbed.server.management.configuration.ProgramProfilingMessageSymbolManagerImpl.java
public void deleteProgramProfilingMessageSymbol(int id) throws RemoteException { log.info("Deleting program profiling message symbol with " + "id: " + id); try {/*ww w. j a va 2 s. co m*/ ProgramProfilingMessageSymbol ppms; ppms = ppmsAdapter.deleteProfilingMessageSymbol(id); writeLock.lock(); try { ppmSymbols.remove(ppms.getID()); } finally { writeLock.unlock(); } notifyObservers(Message.DELETE_SYMBOL, ppms); } catch (AdaptationException ex) { throw new RemoteException("AdaptationException", ex); } catch (Exception ex) { String msg = "Exception in deleteProgramProfilingMessageSymbol"; log.error(msg, ex); throw new RemoteException(msg, ex); } }
From source file:org.molgenis.wikipathways.client.WikiPathwaysRESTBindingStub.java
@Override public WSCurationTag[] getCurationTagsByName(String tagName) throws RemoteException { try {/*from w w w. j av a 2 s . co m*/ String url = baseUrl + "/getCurationTagsByName?tagName=" + tagName; Document jdomDocument = Utils.connect(url, client); Element root = jdomDocument.getRootElement(); List<Element> list = root.getChildren("tags", WSNamespaces.NS1); WSCurationTag[] tags = new WSCurationTag[list.size()]; for (int i = 0; i < list.size(); i++) { tags[i] = Utils.parseCurationTag(list.get(i)); } return tags; } catch (Exception e) { throw new RemoteException(e.getMessage(), e.getCause()); } }
From source file:edu.clemson.cs.nestbed.server.management.deployment.ProgramDeploymentManagerImpl.java
public void resetMote(int moteAddress, String moteSerialID, int programID) throws RemoteException { log.debug("Request to reset mote:\n" + "moteAddress: " + moteAddress + "\n" + "moteSerialID: " + moteSerialID);/* www . j a v a2s.c om*/ try { String commPort = "/dev/motes/" + moteSerialID; MoteComm moteComm = new MoteComm(moteAddress, commPort); ControlMessage controlMsg = new ControlMessage(); controlMsg.set_cmd((short) ControlCommands.RESET.ordinal()); moteComm.start(); moteComm.send(controlMsg); moteComm.stop(); setRadioPowerLevel(moteAddress, commPort, moteSerialID, programID); } catch (IOException ex) { throw new RemoteException("I/O Exception while trying to " + "reset mote.", ex); } }
From source file:edu.clemson.cs.nestbed.server.management.configuration.ProjectDeploymentConfigurationManagerImpl.java
private ProjectDeploymentConfigurationManagerImpl() throws RemoteException { super();/* w ww . j av a 2s . co m*/ try { this.managerLock = new ReentrantReadWriteLock(true); this.readLock = managerLock.readLock(); this.writeLock = managerLock.writeLock(); projDepConfigAdapter = AdapterFactory.createProjectDeploymentConfigurationAdapter(AdapterType.SQL); projDepConfigs = projDepConfigAdapter.readProjectDeploymentConfigurations(); log.debug("ProjectDeploymentConfigurations read:\n" + projDepConfigs); } catch (AdaptationException ex) { throw new RemoteException("AdaptationException", ex); } catch (Exception ex) { String msg = "Exception in " + "ProjectDeploymentConfigurationManagerImpl"; log.error(msg, ex); throw new RemoteException(msg, ex); } }