本文整理汇总了Java中com.sun.corba.se.spi.ior.IOR.write方法的典型用法代码示例。如果您正苦于以下问题:Java IOR.write方法的具体用法?Java IOR.write怎么用?Java IOR.write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.corba.se.spi.ior.IOR
的用法示例。
在下文中一共展示了IOR.write方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: write_Object
import com.sun.corba.se.spi.ior.IOR; //导入方法依赖的package包/类
public void write_Object(org.omg.CORBA.Object ref)
{
if (ref == null) {
IOR nullIOR = IORFactories.makeIOR( orb ) ;
nullIOR.write(parent);
return;
}
// IDL to Java formal 01-06-06 1.21.4.2
if (ref instanceof org.omg.CORBA.LocalObject)
throw wrapper.writeLocalObject(CompletionStatus.COMPLETED_MAYBE);
IOR ior = ORBUtility.connectAndGetIOR( orb, ref ) ;
ior.write(parent);
return;
}
示例2: write_Object
import com.sun.corba.se.spi.ior.IOR; //导入方法依赖的package包/类
public final void write_Object(org.omg.CORBA.Object value) {
if (value == null) {
IOR nullIOR = IORFactories.makeIOR(orb);
nullIOR.write(parent);
return;
}
// IDL to Java formal 01-06-06 1.21.4.2
if (value instanceof org.omg.CORBA.LocalObject) {
throw wrapper.writeLocalObject(CompletionStatus.COMPLETED_MAYBE);
}
IOR ior = ORBUtility.connectAndGetIOR(orb, value);
ior.write(parent);
return;
}
示例3: handleAddressingDisposition
import com.sun.corba.se.spi.ior.IOR; //导入方法依赖的package包/类
protected void handleAddressingDisposition(
CorbaMessageMediator messageMediator,
AddressingDispositionException ex)
{
short addrDisp = -1;
// from iiop.RequestProcessor.
// Respond with expected target addressing disposition.
switch (messageMediator.getRequestHeader().getType()) {
case Message.GIOPRequest :
ReplyMessage replyHeader = MessageBase.createReply(
(ORB)messageMediator.getBroker(),
messageMediator.getGIOPVersion(),
messageMediator.getEncodingVersion(),
messageMediator.getRequestId(),
ReplyMessage.NEEDS_ADDRESSING_MODE,
null, null);
// REVISIT: via acceptor factory.
CDROutputObject outputObject =
sun.corba.OutputStreamFactory.newCDROutputObject(
(ORB)messageMediator.getBroker(),
this,
messageMediator.getGIOPVersion(),
(CorbaConnection)messageMediator.getConnection(),
replyHeader,
ORBConstants.STREAM_FORMAT_VERSION_1);
messageMediator.setOutputObject(outputObject);
outputObject.setMessageMediator(messageMediator);
replyHeader.write(outputObject);
AddressingDispositionHelper.write(outputObject,
ex.expectedAddrDisp());
return;
case Message.GIOPLocateRequest :
LocateReplyMessage locateReplyHeader = MessageBase.createLocateReply(
(ORB)messageMediator.getBroker(),
messageMediator.getGIOPVersion(),
messageMediator.getEncodingVersion(),
messageMediator.getRequestId(),
LocateReplyMessage.LOC_NEEDS_ADDRESSING_MODE,
null);
addrDisp = ex.expectedAddrDisp();
// REVISIT: via acceptor factory.
outputObject =
createAppropriateOutputObject(messageMediator,
messageMediator.getRequestHeader(),
locateReplyHeader);
messageMediator.setOutputObject(outputObject);
outputObject.setMessageMediator(messageMediator);
locateReplyHeader.write(outputObject);
IOR ior = null;
if (ior != null) {
ior.write(outputObject);
}
if (addrDisp != -1) {
AddressingDispositionHelper.write(outputObject, addrDisp);
}
return;
}
}