b.setValue(newPath);
OutputStream out = req.getOutputStream();
try {
b.writeTo(out);
} catch(IOException ex) {
throw new XcpException(ex.getMessage());
} finally {
try { out.close(); } catch(Exception ex) {}
}
} else if(b.getAction().equals(XcpBinding.ACTION_REBIND)) {
NamingServer.this.bind(b.getPath(), b.getName(), b.getValue());
} else if(b.getAction().equals(XcpBinding.ACTION_UNBIND)) {
NamingServer.this.unbind(b.getPath(), b.getName());
} else if(b.getAction().equals(XcpBinding.ACTION_LOOKUP)) {
Object o = (Object)NamingServer.this.lookup(b.getPath(), b.getName());
b.setValue(o);
OutputStream out = req.getOutputStream();
try {
b.writeTo(out);
} catch(IOException ex) {
throw new XcpException(ex.getMessage());
} finally {
try { out.close(); } catch(Exception ex) {}
}
} else if(b.getAction().equals(XcpBinding.ACTION_LIST)) {
Object o = NamingServer.this.list(b.getPath(), b.getName());
b.setValue(o);
OutputStream out = req.getOutputStream();
try {
b.writeTo(out);
} catch(IOException ex) {
throw new XcpException(ex.getMessage());
} finally {
try { out.close(); } catch(Exception ex) {}
}
}
}