SFSBServerRequestInterceptorpublic class SFSBServerRequestInterceptor extends SFSBAbstractInterceptor implements ServerRequestInterceptorThis is the implementation of the JTS PI-based client/server interceptor.
This will be called during request/reply invocation path. |
Fields Summary |
---|
private ThreadLocal | scInfo |
Constructors Summary |
---|
public SFSBServerRequestInterceptor(org.omg.IOP.Codec codec)
super("com.sun.enterprise.iiop.SFSBServerRequestInterceptor", codec);
|
Methods Summary |
---|
public void | receive_request(ServerRequestInfo ri)
| public void | receive_request_service_contexts(ServerRequestInfo ri)
try {
ServiceContext serviceContext =
ri.get_request_service_context(SFSBVersionConstants.SFSB_VERSION_SERVICE_CONTEXT_ID);
if (serviceContext != null) {
byte[] data = serviceContext.context_data;
long version = Utility.bytesToLong(data, 0);
SFSBVersionManager.setRequestClientVersion(version);
if (_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE, "SFSBServerReqInterceptor:: "
+ "receive_request_service_context: " + version);
}
SFSBServiceContextInfo info = new SFSBServiceContextInfo();
info.requestVersion= version;
info.valid = true;
scInfo.set(info);
} else {
scInfo.set(null);
}
} catch (Exception ex) {
scInfo.set(null);
_logger.log(Level.INFO, "SFSBServerReqInterceptor:: receive_request_service_coventext: ", ex);
}
| private void | sendSFSBVersionNumber(java.lang.String callName, ServerRequestInfo ri)
try {
SFSBServiceContextInfo info =
SFSBVersionManager.getServiceContext();
if (info != null) {
long version = SFSBVersionManager.getResponseClientVersion();
byte[] data = new byte[8];
Utility.longToBytes(version, data, 0);
ri.add_reply_service_context(new ServiceContext(
SFSBVersionConstants.SFSB_VERSION_SERVICE_CONTEXT_ID, data), false);
if (_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE, "SFSBServerReqInterceptor:: "
+ callName + ": " + version);
}
}
} catch (Exception ex) {
_logger.log(Level.INFO, "SFSBServerReqInterceptor:: "
+ callName + ": ", ex);
} finally {
SFSBVersionManager.clearServiceContextInfo();
}
| public void | send_exception(ServerRequestInfo ri)
sendSFSBVersionNumber("send_exception", ri);
| public void | send_other(ServerRequestInfo ri)
try {
SFSBServiceContextInfo info = SFSBVersionManager.getServiceContext();
if (info != null) {
_logger.log(Level.WARNING, "SFSBServerReqInterceptor:: send_other: ");
}
} catch (Exception ex) {
_logger.log(Level.WARNING, "SFSBServerReqInterceptor:: send_other: ", ex);
}
| public void | send_reply(ServerRequestInfo ri)
sendSFSBVersionNumber("send_reply", ri);
|
|