下面列出了怎么用com.sun.corba.se.impl.protocol.giopmsgheaders.LocateReplyMessage的API类实例代码及写法,或者点击链接到github查看源代码。
private CDROutputObject createAppropriateOutputObject(
CorbaMessageMediator messageMediator,
Message msg, LocateReplyMessage reply)
{
CDROutputObject outputObject;
if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
// locate msgs 1.0 & 1.1 :=> grow,
outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
(ORB) messageMediator.getBroker(),
this,
GIOPVersion.V1_0,
(CorbaConnection) messageMediator.getConnection(),
reply,
ORBConstants.STREAM_FORMAT_VERSION_1);
} else {
// 1.2 :=> stream
outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
(ORB) messageMediator.getBroker(),
messageMediator,
reply,
ORBConstants.STREAM_FORMAT_VERSION_1);
}
return outputObject;
}
private CDROutputObject createAppropriateOutputObject(
CorbaMessageMediator messageMediator,
Message msg, LocateReplyMessage reply)
{
CDROutputObject outputObject;
if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
// locate msgs 1.0 & 1.1 :=> grow,
outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
(ORB) messageMediator.getBroker(),
this,
GIOPVersion.V1_0,
(CorbaConnection) messageMediator.getConnection(),
reply,
ORBConstants.STREAM_FORMAT_VERSION_1);
} else {
// 1.2 :=> stream
outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
(ORB) messageMediator.getBroker(),
messageMediator,
reply,
ORBConstants.STREAM_FORMAT_VERSION_1);
}
return outputObject;
}
private CDROutputObject createAppropriateOutputObject(
CorbaMessageMediator messageMediator,
Message msg, LocateReplyMessage reply)
{
CDROutputObject outputObject;
if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
// locate msgs 1.0 & 1.1 :=> grow,
outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
(ORB) messageMediator.getBroker(),
this,
GIOPVersion.V1_0,
(CorbaConnection) messageMediator.getConnection(),
reply,
ORBConstants.STREAM_FORMAT_VERSION_1);
} else {
// 1.2 :=> stream
outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
(ORB) messageMediator.getBroker(),
messageMediator,
reply,
ORBConstants.STREAM_FORMAT_VERSION_1);
}
return outputObject;
}
private CDROutputObject createAppropriateOutputObject(
CorbaMessageMediator messageMediator,
Message msg, LocateReplyMessage reply)
{
CDROutputObject outputObject;
if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
// locate msgs 1.0 & 1.1 :=> grow,
outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
(ORB) messageMediator.getBroker(),
this,
GIOPVersion.V1_0,
(CorbaConnection) messageMediator.getConnection(),
reply,
ORBConstants.STREAM_FORMAT_VERSION_1);
} else {
// 1.2 :=> stream
outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
(ORB) messageMediator.getBroker(),
messageMediator,
reply,
ORBConstants.STREAM_FORMAT_VERSION_1);
}
return outputObject;
}
private CDROutputObject createAppropriateOutputObject(
CorbaMessageMediator messageMediator,
Message msg, LocateReplyMessage reply)
{
CDROutputObject outputObject;
if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
// locate msgs 1.0 & 1.1 :=> grow,
outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
(ORB) messageMediator.getBroker(),
this,
GIOPVersion.V1_0,
(CorbaConnection) messageMediator.getConnection(),
reply,
ORBConstants.STREAM_FORMAT_VERSION_1);
} else {
// 1.2 :=> stream
outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
(ORB) messageMediator.getBroker(),
messageMediator,
reply,
ORBConstants.STREAM_FORMAT_VERSION_1);
}
return outputObject;
}
private CDROutputObject createAppropriateOutputObject(
CorbaMessageMediator messageMediator,
Message msg, LocateReplyMessage reply)
{
CDROutputObject outputObject;
if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
// locate msgs 1.0 & 1.1 :=> grow,
outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
(ORB) messageMediator.getBroker(),
this,
GIOPVersion.V1_0,
(CorbaConnection) messageMediator.getConnection(),
reply,
ORBConstants.STREAM_FORMAT_VERSION_1);
} else {
// 1.2 :=> stream
outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
(ORB) messageMediator.getBroker(),
messageMediator,
reply,
ORBConstants.STREAM_FORMAT_VERSION_1);
}
return outputObject;
}
private CDROutputObject createAppropriateOutputObject(
CorbaMessageMediator messageMediator,
Message msg, LocateReplyMessage reply)
{
CDROutputObject outputObject;
if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
// locate msgs 1.0 & 1.1 :=> grow,
outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
(ORB) messageMediator.getBroker(),
this,
GIOPVersion.V1_0,
(CorbaConnection) messageMediator.getConnection(),
reply,
ORBConstants.STREAM_FORMAT_VERSION_1);
} else {
// 1.2 :=> stream
outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
(ORB) messageMediator.getBroker(),
messageMediator,
reply,
ORBConstants.STREAM_FORMAT_VERSION_1);
}
return outputObject;
}
private CDROutputObject createAppropriateOutputObject(
CorbaMessageMediator messageMediator,
Message msg, LocateReplyMessage reply)
{
CDROutputObject outputObject;
if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
// locate msgs 1.0 & 1.1 :=> grow,
outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
(ORB) messageMediator.getBroker(),
this,
GIOPVersion.V1_0,
(CorbaConnection) messageMediator.getConnection(),
reply,
ORBConstants.STREAM_FORMAT_VERSION_1);
} else {
// 1.2 :=> stream
outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
(ORB) messageMediator.getBroker(),
messageMediator,
reply,
ORBConstants.STREAM_FORMAT_VERSION_1);
}
return outputObject;
}
private CDROutputObject createAppropriateOutputObject(
CorbaMessageMediator messageMediator,
Message msg, LocateReplyMessage reply)
{
CDROutputObject outputObject;
if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
// locate msgs 1.0 & 1.1 :=> grow,
outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
(ORB) messageMediator.getBroker(),
this,
GIOPVersion.V1_0,
(CorbaConnection) messageMediator.getConnection(),
reply,
ORBConstants.STREAM_FORMAT_VERSION_1);
} else {
// 1.2 :=> stream
outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
(ORB) messageMediator.getBroker(),
messageMediator,
reply,
ORBConstants.STREAM_FORMAT_VERSION_1);
}
return outputObject;
}
private CDROutputObject createAppropriateOutputObject(
CorbaMessageMediator messageMediator,
Message msg, LocateReplyMessage reply)
{
CDROutputObject outputObject;
if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
// locate msgs 1.0 & 1.1 :=> grow,
outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
(ORB) messageMediator.getBroker(),
this,
GIOPVersion.V1_0,
(CorbaConnection) messageMediator.getConnection(),
reply,
ORBConstants.STREAM_FORMAT_VERSION_1);
} else {
// 1.2 :=> stream
outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
(ORB) messageMediator.getBroker(),
messageMediator,
reply,
ORBConstants.STREAM_FORMAT_VERSION_1);
}
return outputObject;
}
public LocateReplyMessage getLocateReplyHeader()
{
return (LocateReplyMessage) replyHeader;
}
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;
}
}
public LocateReplyMessage getLocateReplyHeader()
{
return (LocateReplyMessage) replyHeader;
}
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;
}
}
public LocateReplyMessage getLocateReplyHeader()
{
return (LocateReplyMessage) replyHeader;
}
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;
}
}
public LocateReplyMessage getLocateReplyHeader()
{
return (LocateReplyMessage) replyHeader;
}
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;
}
}
public LocateReplyMessage getLocateReplyHeader()
{
return (LocateReplyMessage) replyHeader;
}
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;
}
}
public LocateReplyMessage getLocateReplyHeader()
{
return (LocateReplyMessage) replyHeader;
}
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;
}
}
public LocateReplyMessage getLocateReplyHeader()
{
return (LocateReplyMessage) replyHeader;
}
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;
}
}
public LocateReplyMessage getLocateReplyHeader()
{
return (LocateReplyMessage) replyHeader;
}
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;
}
}
public LocateReplyMessage getLocateReplyHeader()
{
return (LocateReplyMessage) replyHeader;
}
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;
}
}
public LocateReplyMessage getLocateReplyHeader()
{
return (LocateReplyMessage) replyHeader;
}
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;
}
}