public void invoke(InputStream is, OutputStream os)
{
try {
Hessian2Input in = new Hessian2Input(is);
AbstractHessianOutput out;
SerializerFactory serializerFactory = getSerializerFactory();
in.setSerializerFactory(serializerFactory);
int code = in.read();
if (code != 'c') {
// XXX: deflate
throw new IOException(L.l("expected 'c' in hessian input at {0}",
code));
}
int major = in.read();
int minor = in.read();
if (major >= 2)
out = new Hessian2Output(os);
else
out = new HessianOutput(os);
out.setSerializerFactory(serializerFactory);
if (_skeleton == null)
throw new Exception("skeleton is null!");
_skeleton.invoke(in, out);
out.close();
} catch (IOException e) {
log.log(Level.INFO, L.l("Unable to process request: "), e);
} catch (Throwable e) {
log.log(Level.INFO, L.l("Unable to process request: "), e);
}