List of usage examples for java.rmi RemoteException RemoteException
public RemoteException(String s, Throwable cause)
From source file:com.amalto.core.delegator.IXtentisWSDelegator.java
@Override public WSTransformerV2PK putTransformerV2(WSPutTransformerV2 wsTransformerV2) throws RemoteException { try {//from w w w. j a v a 2s . co m Transformer ctrl = Util.getTransformerV2CtrlLocal(); TransformerV2POJOPK pk = ctrl.putTransformer(XConverter.WS2POJO(wsTransformerV2.getWsTransformerV2())); return new WSTransformerV2PK(pk.getUniqueId()); } catch (Exception e) { throw new RemoteException(e.getLocalizedMessage(), e); } }
From source file:com.amalto.core.delegator.IXtentisWSDelegator.java
@Override public WSTransformerContext executeTransformerV2(WSExecuteTransformerV2 wsExecuteTransformerV2) throws RemoteException { try {//from w w w .j ava 2 s .c o m final String RUNNING = "XtentisWSBean.executeTransformerV2.running"; //$NON-NLS-1$ TransformerContext context = XConverter.WS2POJO(wsExecuteTransformerV2.getWsTransformerContext()); context.put(RUNNING, Boolean.TRUE); Transformer ctrl = Util.getTransformerV2CtrlLocal(); ctrl.execute(context, XConverter.WS2POJO(wsExecuteTransformerV2.getWsTypedContent()), new TransformerCallBack() { @Override public void contentIsReady(TransformerContext context) throws XtentisException { if (LOGGER.isDebugEnabled()) { LOGGER.debug("XtentisWSBean.executeTransformerV2.contentIsReady() "); //$NON-NLS-1$ } } @Override public void done(TransformerContext context) throws XtentisException { if (LOGGER.isDebugEnabled()) { LOGGER.debug("XtentisWSBean.executeTransformerV2.done() "); //$NON-NLS-1$ } context.put(RUNNING, Boolean.FALSE); } }); while ((Boolean) context.get(RUNNING)) { Thread.sleep(100); } return XConverter.POJO2WS(context); } catch (Exception e) { throw new RemoteException(e.getLocalizedMessage(), e); } }
From source file:com.amalto.core.delegator.IXtentisWSDelegator.java
@Override public WSBackgroundJobPK executeTransformerV2AsJob(WSExecuteTransformerV2AsJob wsExecuteTransformerV2AsJob) throws RemoteException { try {//from w w w .j a v a 2 s . c om Transformer ctrl = Util.getTransformerV2CtrlLocal(); BackgroundJobPOJOPK bgPK = ctrl.executeAsJob( XConverter.WS2POJO(wsExecuteTransformerV2AsJob.getWsTransformerContext()), new TransformerCallBack() { @Override public void contentIsReady(TransformerContext context) throws XtentisException { if (LOGGER.isDebugEnabled()) { LOGGER.debug("XtentisWSBean.executeTransformerV2AsJob.contentIsReady() "); //$NON-NLS-1$ } } @Override public void done(TransformerContext context) throws XtentisException { if (LOGGER.isDebugEnabled()) { LOGGER.debug("XtentisWSBean.executeTransformerV2AsJob.done() "); //$NON-NLS-1$ } } }); return new WSBackgroundJobPK(bgPK.getUniqueId()); } catch (Exception e) { throw new RemoteException(e.getLocalizedMessage(), e); } }
From source file:com.amalto.core.delegator.IXtentisWSDelegator.java
@Override public WSTransformerContext extractThroughTransformerV2( WSExtractThroughTransformerV2 wsExtractThroughTransformerV2) throws RemoteException { try {/*from w ww. j a v a 2s . c o m*/ Transformer ctrl = Util.getTransformerV2CtrlLocal(); return XConverter.POJO2WS(ctrl.extractThroughTransformer( new TransformerV2POJOPK(wsExtractThroughTransformerV2.getWsTransformerV2PK().getPk()), XConverter.WS2POJO(wsExtractThroughTransformerV2.getWsItemPK()))); } catch (Exception e) { throw new RemoteException(e.getLocalizedMessage(), e); } }
From source file:com.amalto.core.delegator.IXtentisWSDelegator.java
@Override public WSBoolean existsTransformerPluginV2(WSExistsTransformerPluginV2 wsExistsTransformerPlugin) throws RemoteException { try {/*w w w.jav a 2 s . co m*/ return new WSBoolean( PluginRegistry.getInstance().existsPlugin(wsExistsTransformerPlugin.getJndiName())); } catch (Exception e) { throw new RemoteException( (e.getCause() == null ? e.getLocalizedMessage() : e.getCause().getLocalizedMessage()), e); } }
From source file:com.amalto.core.delegator.IXtentisWSDelegator.java
@Override public WSString getTransformerPluginV2Configuration(WSTransformerPluginV2GetConfiguration wsGetConfiguration) throws RemoteException { try {//from w w w. jav a2s.com Plugin plugin = PluginRegistry.getInstance().getPlugin(wsGetConfiguration.getJndiName()); return new WSString(plugin.getConfiguration(wsGetConfiguration.getOptionalParameter())); } catch (Exception e) { throw new RemoteException( (e.getCause() == null ? e.getLocalizedMessage() : e.getCause().getLocalizedMessage()), e); } }
From source file:com.amalto.core.delegator.IXtentisWSDelegator.java
@Override public WSString putTransformerPluginV2Configuration(WSTransformerPluginV2PutConfiguration wsPutConfiguration) throws RemoteException { try {/*from w w w . j a va2 s .co m*/ Plugin plugin = PluginRegistry.getInstance().getPlugin(wsPutConfiguration.getJndiName()); plugin.putConfiguration(wsPutConfiguration.getConfiguration()); return new WSString(); } catch (Exception e) { throw new RemoteException( (e.getCause() == null ? e.getLocalizedMessage() : e.getCause().getLocalizedMessage()), e); } }
From source file:com.amalto.core.delegator.IXtentisWSDelegator.java
@Override public WSTransformerPluginV2Details getTransformerPluginV2Details( WSGetTransformerPluginV2Details wsGetTransformerPluginDetails) throws RemoteException { try {//from ww w . j a v a2 s . c om Plugin plugin = PluginRegistry.getInstance().getPlugin(wsGetTransformerPluginDetails.getJndiName()); String description = plugin.getConfiguration(wsGetTransformerPluginDetails.getLanguage()); String documentation = plugin.getDocumentation(wsGetTransformerPluginDetails.getLanguage()); String parametersSchema = plugin.getParametersSchema(); ArrayList<TransformerPluginVariableDescriptor> inputVariableDescriptors = plugin .getInputVariableDescriptors(wsGetTransformerPluginDetails.getLanguage() == null ? "" //$NON-NLS-1$ : wsGetTransformerPluginDetails.getLanguage()); ArrayList<WSTransformerPluginV2VariableDescriptor> wsInputVariableDescriptors = new ArrayList<WSTransformerPluginV2VariableDescriptor>(); if (inputVariableDescriptors != null) { for (TransformerPluginVariableDescriptor descriptor : inputVariableDescriptors) { wsInputVariableDescriptors.add(XConverter.POJO2WS(descriptor)); } } ArrayList<TransformerPluginVariableDescriptor> outputVariableDescriptors = plugin .getOutputVariableDescriptors(wsGetTransformerPluginDetails.getLanguage() == null ? "" //$NON-NLS-1$ : wsGetTransformerPluginDetails.getLanguage()); ArrayList<WSTransformerPluginV2VariableDescriptor> wsOutputVariableDescriptors = new ArrayList<WSTransformerPluginV2VariableDescriptor>(); if (outputVariableDescriptors != null) { for (TransformerPluginVariableDescriptor descriptor : outputVariableDescriptors) { wsOutputVariableDescriptors.add(XConverter.POJO2WS(descriptor)); } } return new WSTransformerPluginV2Details( wsInputVariableDescriptors.toArray( new WSTransformerPluginV2VariableDescriptor[wsInputVariableDescriptors.size()]), wsOutputVariableDescriptors.toArray( new WSTransformerPluginV2VariableDescriptor[wsOutputVariableDescriptors.size()]), description, documentation, parametersSchema); } catch (Exception e) { throw new RemoteException( (e.getCause() == null ? e.getLocalizedMessage() : e.getCause().getLocalizedMessage()), e); } }
From source file:com.amalto.core.delegator.IXtentisWSDelegator.java
@Override public WSTransformerPluginV2SList getTransformerPluginV2SList( WSGetTransformerPluginV2SList wsGetTransformerPluginsList) throws RemoteException { try {/*from w w w . ja va2s . co m*/ ArrayList<WSTransformerPluginV2SListItem> wsList = new ArrayList<WSTransformerPluginV2SListItem>(); Map<String, Plugin> pluginsMap = PluginRegistry.getInstance().getPlugins(); for (String key : pluginsMap.keySet()) { WSTransformerPluginV2SListItem item = new WSTransformerPluginV2SListItem(); item.setJndiName(key.replaceAll(PluginRegistry.PLUGIN_PREFIX, "")); //$NON-NLS-1$ Plugin plugin = pluginsMap.get(key); String description = plugin.getDocumentation(wsGetTransformerPluginsList.getLanguage()); item.setDescription(description); wsList.add(item); } return new WSTransformerPluginV2SList( wsList.toArray(new WSTransformerPluginV2SListItem[wsList.size()])); } catch (Exception e) { throw new RemoteException( (e.getCause() == null ? e.getLocalizedMessage() : e.getCause().getLocalizedMessage()), e); } }
From source file:com.amalto.core.delegator.IXtentisWSDelegator.java
public WSRoutingOrderV2 existsRoutingOrderV2(WSExistsRoutingOrderV2 wsExistsRoutingOrder) throws RemoteException { try {/* w w w . j ava 2 s. c o m*/ RoutingOrder ctrl = Util.getRoutingOrderV2CtrlLocal(); return XConverter.POJO2WS( ctrl.existsRoutingOrder(XConverter.WS2POJO(wsExistsRoutingOrder.getWsRoutingOrderPK()))); } catch (Exception e) { if (LOGGER.isDebugEnabled()) { LOGGER.debug(e.getMessage(), e); } throw new RemoteException(e.getLocalizedMessage(), e); } }