List of usage examples for java.rmi RemoteException RemoteException
public RemoteException(String s, Throwable cause)
From source file:edu.duke.cabig.c3pr.rules.deploy.RuleDeploymentServiceImpl.java
public void registerRuleXml(String bindUri, String ruleXml) throws RemoteException { try {/*from www . j a v a 2 s . c om*/ Package rulePackage = XMLUtil.unmarshalToPackage(ruleXml); registerPackage(bindUri, rulePackage); } catch (Exception e) { log.info("Error occured while registering the rules [bindUri :" + bindUri + ", ruleXml :\r\n" + ruleXml + "\r\n]", e); throw new RemoteException("Error while registering rules", e); } }
From source file:edu.clemson.cs.nestbed.server.management.power.MotePowerManagerImpl.java
public void powerOff(int moteID) throws RemoteException { log.debug("Request to power off mote with moteID " + moteID); try {// ww w . jav a 2 s .c o m Mote mote = moteManager.getMote(moteID); if (mote != null) { UsbPowerControl.powerOffDevice(mote.getHubBus(), mote.getHubDevice(), mote.getHubPort()); } } catch (RemoteException ex) { throw ex; } catch (Exception ex) { String msg = "Exception in powerOff"; log.error(msg, ex); throw new RemoteException(msg, ex); } }
From source file:it.cnr.icar.eric.service.validationTest.alwaysSucceed.AlwaysSucceed.java
public SOAPElement validateContent(SOAPElement partValidateContentRequest) throws RemoteException { try {//from ww w . j a v a2s . c om vcResp = cmsFac.createValidateContentResponse(); vcResp.setStatus(CANONICAL_RESPONSE_STATUS_TYPE_ID_Success); vcRespElement = getSOAPElementFromBindingObject(vcResp); } catch (Exception e) { throw new RemoteException("Could not create response.", e); } return vcRespElement; }
From source file:edu.clemson.cs.nestbed.server.management.sfcontrol.SerialForwarderManagerImpl.java
public int enableSerialForwarder(int moteID, int moteAddress) throws RemoteException { int port = 9000 + moteAddress; try {/*w ww . jav a 2 s . com*/ Mote mote = MoteManagerImpl.getInstance().getMote(moteID); SerialForwarder sf = new SerialForwarder(new String[] { "-port", Integer.toString(port), "-comm", "serial@/dev/motes/" + mote.getMoteSerialID() + ":telos", "-no-gui", "-quiet" }); serialForwarderMap.put(moteID, sf); } catch (Exception ex) { String msg = "Exception while enabling serial forwarder"; log.error(msg, ex); throw new RemoteException(msg, ex); } return port; }
From source file:org.molgenis.wikipathways.client.WikiPathwaysRESTBindingStub.java
@Override public WSSearchResult[] findInteractions(String query) throws RemoteException { try {/*from w ww .j a va2 s . c om*/ query = query.replace(" ", "+"); String url = baseUrl + "/findInteractions?query=" + query; Document jdomDocument = Utils.connect(url, client); Element root = jdomDocument.getRootElement(); List<Element> list = root.getChildren("result", WSNamespaces.NS1); WSSearchResult[] res = new WSSearchResult[list.size()]; for (int i = 0; i < list.size(); i++) { res[i] = Utils.parseWSSearchResult(list.get(i)); } return res; } catch (Exception e) { throw new RemoteException(e.getMessage(), e.getCause()); } }
From source file:edu.clemson.cs.nestbed.server.management.configuration.TestbedManagerImpl.java
public List<Testbed> getTestbedList() throws RemoteException { log.debug("getTestbedList() called"); List<Testbed> testbedList = null; readLock.lock();//from w ww. j a va 2s.c om try { testbedList = new ArrayList<Testbed>(testbeds.values()); } catch (Exception ex) { String msg = "Exception in getTestbedList"; log.error(msg, ex); throw new RemoteException(msg, ex); } finally { readLock.unlock(); } return testbedList; }
From source file:edu.clemson.cs.nestbed.server.management.configuration.MoteManagerImpl.java
public Mote getMote(String moteSerialID) throws RemoteException { Mote mote = null;/*from ww w . ja va 2 s. c o m*/ readLock.lock(); try { for (Mote i : motes.values()) { if (i.getMoteSerialID().equals(moteSerialID)) { mote = i; break; } } } catch (Exception ex) { String msg = "Exception in getMote"; log.error(msg, ex); throw new RemoteException(msg, ex); } finally { readLock.unlock(); } return mote; }
From source file:edu.clemson.cs.nestbed.server.management.configuration.MoteTypeManagerImpl.java
private MoteTypeManagerImpl() throws RemoteException { super();/* w w w . j a v a2 s.c om*/ try { managerLock = new ReentrantReadWriteLock(true); readLock = managerLock.readLock(); writeLock = managerLock.writeLock(); moteTypeAdapter = AdapterFactory.createMoteTypeAdapter(AdapterType.SQL); moteTypes = moteTypeAdapter.readMoteTypes(); log.debug("MoteTypes read:\n" + moteTypes); } catch (AdaptationException ex) { throw new RemoteException("AdaptationException", ex); } catch (Exception ex) { String msg = "Exception in MoteTypeManagerImpl"; log.error(msg, ex); throw new RemoteException(msg, ex); } }
From source file:edu.clemson.cs.nestbed.server.management.power.MotePowerManagerImpl.java
public void powerOn(int moteID) throws RemoteException { log.debug("Request to power on mote with moteID " + moteID); try {/*w w w .jav a 2 s . com*/ Mote mote = moteManager.getMote(moteID); if (mote != null) { UsbPowerControl.powerOnDevice(mote.getHubBus(), mote.getHubDevice(), mote.getHubPort()); } } catch (RemoteException ex) { throw ex; } catch (Exception ex) { String msg = "Exception in powerOn"; log.error(msg, ex); throw new RemoteException(msg, ex); } }
From source file:gridool.GridServer.java
@SuppressWarnings("unchecked") @Override/* www . j a va2 s. com*/ public <A extends Serializable, R extends Serializable> R execute(GridJobDesc jobDesc, A arg) throws RemoteException { String jobClassName = jobDesc.getJobClass(); String deployGroup = jobDesc.getDeploymentGroup(); ClassLoader cl = registry.getDeploymentGroupClassLoader(deployGroup); final Class<? extends GridJob<A, R>> jobClass; try { jobClass = (Class<? extends GridJob<A, R>>) cl.loadClass(jobClassName); } catch (ClassNotFoundException e) { throw new RemoteException("Class not found: " + jobClassName, e); } return execute(jobClass, arg, deployGroup); }