本文整理汇总了Java中com.sun.corba.se.spi.protocol.CorbaMessageMediator.setInputObject方法的典型用法代码示例。如果您正苦于以下问题:Java CorbaMessageMediator.setInputObject方法的具体用法?Java CorbaMessageMediator.setInputObject怎么用?Java CorbaMessageMediator.setInputObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.corba.se.spi.protocol.CorbaMessageMediator
的用法示例。
在下文中一共展示了CorbaMessageMediator.setInputObject方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: responseReceived
import com.sun.corba.se.spi.protocol.CorbaMessageMediator; //导入方法依赖的package包/类
public void responseReceived(InputObject is)
{
CDRInputObject inputObject = (CDRInputObject) is;
LocateReplyOrReplyMessage header = (LocateReplyOrReplyMessage)
inputObject.getMessageHeader();
Integer requestId = new Integer(header.getRequestId());
OutCallDesc call = out_calls.get(requestId);
if (orb.transportDebugFlag) {
dprint(".responseReceived: id/"
+ requestId + ": "
+ header);
}
// This is an interesting case. It could mean that someone sent us a
// reply message, but we don't know what request it was for. That
// would probably call for an error. However, there's another case
// that's normal and we should think about --
//
// If the unmarshaling thread does all of its work inbetween the time
// the ReaderThread gives it the last fragment and gets to the
// out_calls.get line, then it will also be null, so just return;
if (call == null) {
if (orb.transportDebugFlag) {
dprint(".responseReceived: id/"
+ requestId
+ ": no waiter: "
+ header);
}
return;
}
// Set the reply InputObject and signal the client thread
// that the reply has been received.
// The thread signalled will remove outcall descriptor if appropriate.
// Otherwise, it'll be removed when last fragment for it has been put on
// BufferManagerRead's queue.
synchronized (call.done) {
CorbaMessageMediator messageMediator = (CorbaMessageMediator)
call.messageMediator;
if (orb.transportDebugFlag) {
dprint(".responseReceived: "
+ opAndId(messageMediator)
+ ": notifying waiters");
}
messageMediator.setReplyHeader(header);
messageMediator.setInputObject(is);
inputObject.setMessageMediator(messageMediator);
call.inputObject = is;
call.done.notify();
}
}