/** * Invoke the object with the request from the input stream. * * @param in the Burlap input stream * @param out the Burlap output stream */ public void invoke(BurlapInput in, BurlapOutput out) throws Exception { invoke(_service, in, out); }
/** * Creates a new servlet skeleton based on an API and an object * * @param serviceClass the remoteApi exposed to the server * @param service the managed service object */ public Servlet createServlet(Class serviceClass, Object service) throws ServiceException { BurlapServlet servlet = new BurlapServlet(); servlet.setAPIClass(getRemoteAPI(serviceClass)); servlet.setService(service); return servlet; } }
String className = getInitParameter("service-class"); Class<?> serviceClass = null; ((BurlapServlet) _service).setService(this); if (_service instanceof Service) ((Service) _service).init(getServletConfig()); else if (_service instanceof Servlet) ((Servlet) _service).init(getServletConfig()); String className = getInitParameter("api-class"); _skeleton = new BurlapSkeleton(_service, _apiClass); } catch (ServletException e) { throw e;
Method method = getMethod(methodName); value = getAPIClassName(); else if ("java.home.class".equals(attrName)) value = getHomeClassName(); else if ("java.object.class".equals(attrName)) value = getObjectClassName();
/** * Initialize this service exporter. */ public void prepare() { checkService(); checkServiceInterface(); this.skeleton = new BurlapSkeleton(getService(), getServiceInterface()); }
String className = getInitParameter("service-class"); Class serviceClass = null; ((BurlapServlet) _service).setService(this); if (_service instanceof Service) ((Service) _service).init(getServletConfig()); else if (_service instanceof Servlet) ((Servlet) _service).init(getServletConfig()); String className = getInitParameter("api-class"); _skeleton = new BurlapSkeleton(_service, _apiClass); } catch (ServletException e) { throw e;
Method method = getMethod(methodName); value = getAPIClassName(); else if ("java.home.class".equals(attrName)) value = getHomeClassName(); else if ("java.object.class".equals(attrName)) value = getObjectClassName();
/** * Invoke the object with the request from the input stream. * * @param in the Burlap input stream * @param out the Burlap output stream */ public void invoke(BurlapInput in, BurlapOutput out) throws Exception { invoke(_service, in, out); }
/** * Initialize this service exporter. */ public void prepare() { checkService(); checkServiceInterface(); this.skeleton = new BurlapSkeleton(getProxyForService(), getServiceInterface()); }
String className = getInitParameter("service-class"); Class<?> serviceClass = null; ((BurlapServlet) _service).setService(this); if (_service instanceof Service) ((Service) _service).init(getServletConfig()); else if (_service instanceof Servlet) ((Servlet) _service).init(getServletConfig()); String className = getInitParameter("api-class"); _skeleton = new BurlapSkeleton(_service, _apiClass); } catch (ServletException e) { throw e;
Method method = getMethod(methodName); value = getAPIClassName(); else if ("java.home.class".equals(attrName)) value = getHomeClassName(); else if ("java.object.class".equals(attrName)) value = getObjectClassName();
/** * Invoke the object with the request from the input stream. * * @param in the Burlap input stream * @param out the Burlap output stream */ public void invoke(BurlapInput in, BurlapOutput out) throws Exception { invoke(_service, in, out); }
/** * Perform an invocation on the exported object. * @param inputStream the request stream * @param outputStream the response stream * @throws Throwable if invocation failed */ public void invoke(InputStream inputStream, OutputStream outputStream) throws Throwable { Assert.notNull(this.skeleton, "Burlap exporter has not been initialized"); try { this.skeleton.invoke(new BurlapInput(inputStream), new BurlapOutput(outputStream)); } finally { try { inputStream.close(); } catch (IOException ex) { // ignore } try { outputStream.close(); } catch (IOException ex) { // ignore } } } }
/** * Perform an invocation on the exported object. * @param inputStream the request stream * @param outputStream the response stream * @throws Throwable if invocation failed */ public void invoke(InputStream inputStream, OutputStream outputStream) throws Throwable { Assert.notNull(this.skeleton, "Burlap exporter has not been initialized"); ClassLoader originalClassLoader = overrideThreadContextClassLoader(); try { this.skeleton.invoke(new BurlapInput(inputStream), new BurlapOutput(outputStream)); } finally { try { inputStream.close(); } catch (IOException ex) { // ignore } try { outputStream.close(); } catch (IOException ex) { // ignore } resetThreadContextClassLoader(originalClassLoader); } }
BurlapOutput out = new BurlapOutput(os); _skeleton.invoke(in, out); } catch (RuntimeException e) { throw e;
BurlapOutput out = new BurlapOutput(os); _skeleton.invoke(in, out); } catch (RuntimeException e) { throw e;
BurlapOutput out = new BurlapOutput(os); _skeleton.invoke(in, out); } catch (RuntimeException e) { throw e;