01: package com.sun.portal.search.rdmserver;
02:
03: import com.sun.portal.search.rdm.*;
04: import com.sun.portal.search.soif.*;
05: import com.sun.portal.search.util.*;
06: import com.sun.portal.log.common.PortalLogger;
07:
08: import java.util.logging.Logger;
09: import java.util.logging.Level;
10:
11: /**
12: * Marshals requests from rdmui bridge and responses from rdmsvr.
13: */
14: public class RDMUIServer {
15:
16: public static byte[] service(byte[] request) throws Exception {
17: Logger logger = SearchLogger.getLogger();
18: logger.log(Level.FINE, "PSSH_CSPSRDMS0072");
19: SOIFBuffer response = new SOIFBuffer();
20: try {
21: // Create RDM request and response objects
22: RDMRequest rdmreq = new RDMRequest(new SOIFInputStream(
23: request));
24: RDMResponse rdmres = new RDMResponse(new SOIFOutputStream(
25: response));
26: // Service the request
27: RDMServer.rdmsvr.service(rdmreq, rdmres);
28: return response.toByteArray();
29: } catch (Exception e) {
30: logger.log(Level.WARNING, "PSSH_CSPSRDMS0073", e);
31: throw e;
32: }
33: }
34:
35: }
|