/** * Set whether to allow non-serializable types as Hessian arguments * and return values. Default is "true". */ public void setAllowNonSerializable(boolean allowNonSerializable) { this.serializerFactory.setAllowNonSerializable(allowNonSerializable); }
/** * Set whether to allow non-serializable types as Hessian arguments * and return values. Default is "true". */ public void setAllowNonSerializable(boolean allowNonSerializable) { this.serializerFactory.setAllowNonSerializable(allowNonSerializable); }
/** * Set whether to allow non-serializable types as Hessian arguments * and return values. Default is "true". */ public void setAllowNonSerializable(boolean allowNonSerializable) { this.proxyFactory.getSerializerFactory().setAllowNonSerializable(allowNonSerializable); }
/** * Set whether to allow non-serializable types as Hessian arguments * and return values. Default is "true". */ public void setAllowNonSerializable(boolean allowNonSerializable) { this.proxyFactory.getSerializerFactory().setAllowNonSerializable(allowNonSerializable); }
/** * Set whether to allow non-serializable types as Hessian arguments * and return values. Default is "true". */ public void setAllowNonSerializable(boolean allowNonSerializable) { this.serializerFactory.setAllowNonSerializable(allowNonSerializable); }
/** * Set whether to allow non-serializable types as Hessian arguments * and return values. Default is "true". */ public void setAllowNonSerializable(boolean allowNonSerializable) { this.serializerFactory.setAllowNonSerializable(allowNonSerializable); }
/** * Set whether to allow non-serializable types as Hessian arguments * and return values. Default is "true". */ public void setAllowNonSerializable(boolean allowNonSerializable) { this.proxyFactory.getSerializerFactory().setAllowNonSerializable(allowNonSerializable); }
/** * Set whether to allow non-serializable types as Hessian arguments * and return values. Default is "true". */ public void setAllowNonSerializable(boolean allowNonSerializable) { this.proxyFactory.getSerializerFactory().setAllowNonSerializable(allowNonSerializable); }
/** * Client side of the handshake */ public static Response sendHandshake(Request request, Socket s) throws IOException { HessianInput input = new HessianInput(s.getInputStream()); HessianOutput output = new HessianOutput(s.getOutputStream()); output.findSerializerFactory().setAllowNonSerializable(true); output.writeObject(request); return (Response) input.readObject(); }
private static Object hessianTransport(Object source, ClassLoader contextClassLoader) { Object target; ClassLoader currentContextClassloader = Thread.currentThread().getContextClassLoader(); try { if (contextClassLoader != null) { Thread.currentThread().setContextClassLoader(contextClassLoader); } SerializerFactory serializerFactory = new SerializerFactory(); serializerFactory.setAllowNonSerializable(true); ByteArrayOutputStream bos = new ByteArrayOutputStream(); Hessian2Output h2o = new Hessian2Output(bos); h2o.setSerializerFactory(serializerFactory); h2o.writeObject(source); h2o.flush(); byte[] content = bos.toByteArray(); Hessian2Input h2i = new Hessian2Input(new ByteArrayInputStream(content)); h2i.setSerializerFactory(serializerFactory); target = h2i.readObject(); } catch (IOException ex) { throw new RuntimeException(ex); } finally { Thread.currentThread().setContextClassLoader(currentContextClassloader); } return target; } }
output.findSerializerFactory().setAllowNonSerializable(true);