本文整理汇总了Java中com.sun.corba.se.spi.ior.iiop.GIOPVersion类的典型用法代码示例。如果您正苦于以下问题:Java GIOPVersion类的具体用法?Java GIOPVersion怎么用?Java GIOPVersion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GIOPVersion类属于com.sun.corba.se.spi.ior.iiop包,在下文中一共展示了GIOPVersion类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getStreamFormatVersionForThisRequest
import com.sun.corba.se.spi.ior.iiop.GIOPVersion; //导入依赖的package包/类
private byte getStreamFormatVersionForThisRequest(IOR ior,
GIOPVersion giopVersion)
{
byte localMaxVersion
= ORBUtility.getMaxStreamFormatVersion();
IOR effectiveTargetIOR =
((CorbaContactInfo)this.contactInfo).getEffectiveTargetIOR();
IIOPProfileTemplate temp =
(IIOPProfileTemplate)effectiveTargetIOR.getProfile().getTaggedProfileTemplate();
Iterator iter = temp.iteratorById(TAG_RMI_CUSTOM_MAX_STREAM_FORMAT.value);
if (!iter.hasNext()) {
// Didn't have the max stream format version tagged
// component.
if (giopVersion.lessThan(GIOPVersion.V1_3))
return ORBConstants.STREAM_FORMAT_VERSION_1;
else
return ORBConstants.STREAM_FORMAT_VERSION_2;
}
byte remoteMaxVersion
= ((MaxStreamFormatVersionComponent)iter.next()).getMaxStreamFormatVersion();
return (byte)Math.min(localMaxVersion, remoteMaxVersion);
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:27,代码来源:CorbaMessageMediatorImpl.java
示例2: createMessageMediator
import com.sun.corba.se.spi.ior.iiop.GIOPVersion; //导入依赖的package包/类
public MessageMediator createMessageMediator(Broker broker,
ContactInfo contactInfo,
Connection connection,
String methodName,
boolean isOneWay)
{
if (connection != null) {
/// XXX LOGGING
throw new RuntimeException("connection is not null");
}
CorbaMessageMediator messageMediator =
new CorbaMessageMediatorImpl(
(ORB) broker,
contactInfo,
null, // Connection;
GIOPVersion.chooseRequestVersion( (ORB)broker,
effectiveTargetIOR),
effectiveTargetIOR,
requestId++, // Fake RequestId
getAddressingDisposition(),
methodName,
isOneWay);
return messageMediator;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:27,代码来源:SharedCDRContactInfoImpl.java
示例3: createCloseConnection
import com.sun.corba.se.spi.ior.iiop.GIOPVersion; //导入依赖的package包/类
public static Message createCloseConnection(GIOPVersion gv) {
if (gv.equals(GIOPVersion.V1_0)) { // 1.0
return new Message_1_0(Message.GIOPBigMagic, false,
Message.GIOPCloseConnection, 0);
} else if (gv.equals(GIOPVersion.V1_1)) { // 1.1
return new Message_1_1(Message.GIOPBigMagic, GIOPVersion.V1_1,
FLAG_NO_FRAG_BIG_ENDIAN,
Message.GIOPCloseConnection, 0);
} else if (gv.equals(GIOPVersion.V1_2)) { // 1.2
return new Message_1_1(Message.GIOPBigMagic, GIOPVersion.V1_2,
FLAG_NO_FRAG_BIG_ENDIAN,
Message.GIOPCloseConnection, 0);
} else {
throw wrapper.giopVersionError(
CompletionStatus.COMPLETED_MAYBE);
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:MessageBase.java
示例4: CDROutputObject
import com.sun.corba.se.spi.ior.iiop.GIOPVersion; //导入依赖的package包/类
private CDROutputObject(
ORB orb, GIOPVersion giopVersion, Message header,
BufferManagerWrite manager, byte streamFormatVersion,
CorbaMessageMediator mediator)
{
super(orb, giopVersion, header.getEncodingVersion(),
false, manager, streamFormatVersion,
((mediator != null && mediator.getConnection() != null) ?
((CorbaConnection)mediator.getConnection()).
shouldUseDirectByteBuffers() : false));
this.header = header;
this.orb = orb;
this.wrapper = ORBUtilSystemException.get( orb, CORBALogDomains.RPC_ENCODING ) ;
this.omgWrapper = OMGSystemException.get( orb, CORBALogDomains.RPC_ENCODING ) ;
getBufferManager().setOutputObject(this);
this.corbaMessageMediator = mediator;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:CDROutputObject.java
示例5: createAppropriateOutputObject
import com.sun.corba.se.spi.ior.iiop.GIOPVersion; //导入依赖的package包/类
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;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:CorbaMessageMediatorImpl.java
示例6: RequestMessage_1_1
import com.sun.corba.se.spi.ior.iiop.GIOPVersion; //导入依赖的package包/类
RequestMessage_1_1(ORB orb, ServiceContexts _service_contexts,
int _request_id, boolean _response_expected, byte[] _reserved,
byte[] _object_key, String _operation,
Principal _requesting_principal) {
super(Message.GIOPBigMagic, GIOPVersion.V1_1, FLAG_NO_FRAG_BIG_ENDIAN,
Message.GIOPRequest, 0);
this.orb = orb;
this.wrapper = ORBUtilSystemException.get( orb,
CORBALogDomains.RPC_PROTOCOL ) ;
service_contexts = _service_contexts;
request_id = _request_id;
response_expected = _response_expected;
reserved = _reserved;
object_key = _object_key;
operation = _operation;
requesting_principal = _requesting_principal;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:RequestMessage_1_1.java
示例7: newBufferManagerRead
import com.sun.corba.se.spi.ior.iiop.GIOPVersion; //导入依赖的package包/类
public static BufferManagerRead newBufferManagerRead(
GIOPVersion version, byte encodingVersion, ORB orb) {
// REVISIT - On the reading side, shouldn't we monitor the incoming
// fragments on a given connection to determine what fragment size
// they're using, then use that ourselves?
if (encodingVersion != Message.CDR_ENC_VERSION) {
return new BufferManagerReadGrow(orb);
}
switch (version.intValue())
{
case GIOPVersion.VERSION_1_0:
return new BufferManagerReadGrow(orb);
case GIOPVersion.VERSION_1_1:
case GIOPVersion.VERSION_1_2:
// The stream reader can handle fragmented and
// non fragmented messages
return new BufferManagerReadStream(orb);
default:
// REVISIT - what is appropriate?
throw new INTERNAL("Unknown GIOP version: "
+ version);
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:27,代码来源:BufferManagerFactory.java
示例8: newOutputStream
import com.sun.corba.se.spi.ior.iiop.GIOPVersion; //导入依赖的package包/类
public static CDROutputStreamBase newOutputStream(
ORB orb, GIOPVersion version, byte encodingVersion) {
switch(version.intValue()) {
case GIOPVersion.VERSION_1_0:
return new CDROutputStream_1_0();
case GIOPVersion.VERSION_1_1:
return new CDROutputStream_1_1();
case GIOPVersion.VERSION_1_2:
if (encodingVersion != Message.CDR_ENC_VERSION) {
return
new IDLJavaSerializationOutputStream(encodingVersion);
}
return new CDROutputStream_1_2();
default:
ORBUtilSystemException wrapper = ORBUtilSystemException.get( orb,
CORBALogDomains.RPC_ENCODING ) ;
// REVISIT - what is appropriate? INTERNAL exceptions
// are really hard to track later.
throw wrapper.unsupportedGiopVersion( version ) ;
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:22,代码来源:CDROutputStream.java
示例9: writeServiceContextsInOrder
import com.sun.corba.se.spi.ior.iiop.GIOPVersion; //导入依赖的package包/类
/**
* Write the service contexts in scMap in a desired order.
* Right now, the only special case we have is UnknownExceptionInfo,
* so I'm merely writing it last if present.
*/
private void writeServiceContextsInOrder(OutputStream os, GIOPVersion gv) {
// Temporarily remove this rather than check it per iteration
Integer ueInfoId
= new Integer(UEInfoServiceContext.SERVICE_CONTEXT_ID);
Object unknownExceptionInfo = scMap.remove(ueInfoId);
Iterator iter = scMap.keySet().iterator();
while (iter.hasNext()) {
Integer id = (Integer)iter.next();
writeMapEntry(os, id, scMap.get(id), gv);
}
// Write the UnknownExceptionInfo service context last
// (so it will be after the CodeBase) and restore it in
// the map.
if (unknownExceptionInfo != null) {
writeMapEntry(os, ueInfoId, unknownExceptionInfo, gv);
scMap.put(ueInfoId, unknownExceptionInfo);
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:31,代码来源:ServiceContexts.java
示例10: CDROutputStream
import com.sun.corba.se.spi.ior.iiop.GIOPVersion; //导入依赖的package包/类
public CDROutputStream(ORB orb,
GIOPVersion version,
byte encodingVersion,
boolean littleEndian,
BufferManagerWrite bufferManager,
byte streamFormatVersion,
boolean usePooledByteBuffers)
{
impl = OutputStreamFactory.newOutputStream(orb, version,
encodingVersion);
impl.init(orb, littleEndian, bufferManager,
streamFormatVersion, usePooledByteBuffers);
impl.setParent(this);
this.orb = orb ;
this.wrapper = ORBUtilSystemException.get( orb,
CORBALogDomains.RPC_ENCODING ) ;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:CDROutputStream.java
示例11: newInputStream
import com.sun.corba.se.spi.ior.iiop.GIOPVersion; //导入依赖的package包/类
public static CDRInputStreamBase newInputStream(
ORB orb, GIOPVersion version, byte encodingVersion) {
switch(version.intValue()) {
case GIOPVersion.VERSION_1_0:
return new CDRInputStream_1_0();
case GIOPVersion.VERSION_1_1:
return new CDRInputStream_1_1();
case GIOPVersion.VERSION_1_2:
if (encodingVersion != Message.CDR_ENC_VERSION) {
return
new IDLJavaSerializationInputStream(encodingVersion);
}
return new CDRInputStream_1_2();
// else fall through and report exception.
default:
ORBUtilSystemException wrapper = ORBUtilSystemException.get( orb,
CORBALogDomains.RPC_ENCODING ) ;
throw wrapper.unsupportedGiopVersion( version ) ;
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:CDRInputStream.java
示例12: write
import com.sun.corba.se.spi.ior.iiop.GIOPVersion; //导入依赖的package包/类
public void write(org.omg.CORBA.portable.OutputStream ostream) {
super.write(ostream);
ostream.write_ulong(this.request_id);
ostream.write_long(this.reply_status);
if (this.service_contexts != null) {
service_contexts.write(
(org.omg.CORBA_2_3.portable.OutputStream) ostream,
GIOPVersion.V1_2);
} else {
ServiceContexts.writeNullServiceContext(
(org.omg.CORBA_2_3.portable.OutputStream) ostream);
}
// CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
// aligned on an 8 octet boundary.
// Ensures that the first write operation called from the stub code,
// during body construction, would insert a header padding, such that
// the body is aligned on an 8-octet boundary.
((CDROutputStream)ostream).setHeaderPadding(true);
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:22,代码来源:ReplyMessage_1_2.java
示例13: createMessageMediator
import com.sun.corba.se.spi.ior.iiop.GIOPVersion; //导入依赖的package包/类
public MessageMediator createMessageMediator(Broker broker,
ContactInfo contactInfo,
Connection connection,
String methodName,
boolean isOneWay)
{
// REVISIT: Would like version, ior, requestid, etc., decisions
// to be in client subcontract. Cannot pass these to this
// factory method because it breaks generic abstraction.
// Maybe set methods on mediator called from subcontract
// after creation?
CorbaMessageMediator messageMediator =
new CorbaMessageMediatorImpl(
(ORB) broker,
contactInfo,
connection,
GIOPVersion.chooseRequestVersion( (ORB)broker,
effectiveTargetIOR),
effectiveTargetIOR,
((CorbaConnection)connection).getNextRequestId(),
getAddressingDisposition(),
methodName,
isOneWay);
return messageMediator;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:27,代码来源:CorbaContactInfoBase.java
示例14: createWCharCTBConverter
import com.sun.corba.se.spi.ior.iiop.GIOPVersion; //导入依赖的package包/类
protected CodeSetConversion.CTBConverter createWCharCTBConverter() {
if (getGIOPVersion().equals(GIOPVersion.V1_0))
throw wrapper.wcharDataInGiop10(CompletionStatus.COMPLETED_MAYBE);
// In the case of GIOP 1.1, we take the byte order of the stream and don't
// use byte order markers since we're limited to a 2 byte fixed width encoding.
if (getGIOPVersion().equals(GIOPVersion.V1_1))
return CodeSetConversion.impl().getCTBConverter(OSFCodeSetRegistry.UTF_16,
isLittleEndian(),
false);
// Assume anything else meets GIOP 1.2 requirements
//
// Use byte order markers? If not, use big endian in GIOP 1.2.
// (formal 00-11-03 15.3.16)
boolean useBOM = ((ORB)orb()).getORBData().useByteOrderMarkersInEncapsulations();
return CodeSetConversion.impl().getCTBConverter(OSFCodeSetRegistry.UTF_16,
false,
useBOM);
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:23,代码来源:EncapsOutputStream.java
示例15: newEncapsInputStream
import com.sun.corba.se.spi.ior.iiop.GIOPVersion; //导入依赖的package包/类
public static EncapsInputStream newEncapsInputStream(
final org.omg.CORBA.ORB orb, final byte[] buf, final int size,
final boolean littleEndian, final GIOPVersion version) {
return AccessController
.doPrivileged(new PrivilegedAction<EncapsInputStream>() {
@Override
public EncapsInputStream run() {
return new EncapsInputStream(orb, buf, size,
littleEndian, version);
}
});
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:EncapsInputStreamFactory.java
示例16: getGIOPVersion
import com.sun.corba.se.spi.ior.iiop.GIOPVersion; //导入依赖的package包/类
public GIOPVersion getGIOPVersion()
{
if (messageHeader != null) {
return messageHeader.getGIOPVersion();
}
return getRequestHeader().getGIOPVersion();
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:CorbaMessageMediatorImpl.java
示例17: newTypeCodeInputStream
import com.sun.corba.se.spi.ior.iiop.GIOPVersion; //导入依赖的package包/类
public static TypeCodeInputStream newTypeCodeInputStream(
final org.omg.CORBA.ORB orb, final byte[] buf, final int size,
final boolean littleEndian, final GIOPVersion version) {
return AccessController
.doPrivileged(new PrivilegedAction<TypeCodeInputStream>() {
@Override
public TypeCodeInputStream run() {
return new TypeCodeInputStream(orb, buf, size,
littleEndian, version);
}
});
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:EncapsInputStreamFactory.java
示例18: newCDROutputObject
import com.sun.corba.se.spi.ior.iiop.GIOPVersion; //导入依赖的package包/类
public static CDROutputObject newCDROutputObject(
final ORB orb, final CorbaMessageMediator mediator,
final GIOPVersion giopVersion, final CorbaConnection connection,
final Message header, final byte streamFormatVersion) {
return AccessController.doPrivileged(
new PrivilegedAction<CDROutputObject>() {
@Override
public CDROutputObject run() {
return new CDROutputObject(orb, mediator,
giopVersion, connection, header, streamFormatVersion);
}
});
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:OutputStreamFactory.java
示例19: write
import com.sun.corba.se.spi.ior.iiop.GIOPVersion; //导入依赖的package包/类
public void write(org.omg.CORBA.portable.OutputStream ostream) {
super.write(ostream);
if (this.service_contexts != null) {
service_contexts.write(
(org.omg.CORBA_2_3.portable.OutputStream) ostream,
GIOPVersion.V1_0);
} else {
ServiceContexts.writeNullServiceContext(
(org.omg.CORBA_2_3.portable.OutputStream) ostream);
}
ostream.write_ulong(this.request_id);
ostream.write_long(this.reply_status);
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:ReplyMessage_1_0.java
示例20: createWCharBTCConverter
import com.sun.corba.se.spi.ior.iiop.GIOPVersion; //导入依赖的package包/类
protected CodeSetConversion.BTCConverter createWCharBTCConverter() {
CodeSetComponentInfo.CodeSetContext codesets = getCodeSets();
// If the connection doesn't have its negotiated
// code sets by now, we have to throw an exception.
// See CORBA formal 00-11-03 13.9.2.6.
if (codesets == null) {
if (getConnection().isServer())
throw omgWrapper.noClientWcharCodesetCtx() ;
else
throw omgWrapper.noServerWcharCodesetCmp() ;
}
OSFCodeSetRegistry.Entry wcharSet
= OSFCodeSetRegistry.lookupEntry(codesets.getWCharCodeSet());
if (wcharSet == null)
throw wrapper.unknownCodeset( wcharSet ) ;
// For GIOP 1.2 and UTF-16, use big endian if there is no byte
// order marker. (See issue 3405b)
//
// For GIOP 1.1 and UTF-16, use the byte order the stream if
// there isn't (and there shouldn't be) a byte order marker.
//
// GIOP 1.0 doesn't have wchars. If we're talking to a legacy ORB,
// we do what our old ORBs did.
if (wcharSet == OSFCodeSetRegistry.UTF_16) {
if (getGIOPVersion().equals(GIOPVersion.V1_2))
return CodeSetConversion.impl().getBTCConverter(wcharSet, false);
}
return CodeSetConversion.impl().getBTCConverter(wcharSet, isLittleEndian());
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:36,代码来源:CDRInputObject.java
注:本文中的com.sun.corba.se.spi.ior.iiop.GIOPVersion类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论