Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_corba
提交
96a1305a
D
dragonwell8_corba
项目概览
openanolis
/
dragonwell8_corba
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_corba
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
96a1305a
编写于
4月 30, 2013
作者:
C
coffeys
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8000642: Better handling of objects for transportation
Reviewed-by: alanb, mchung, skoivu
上级
6694d73f
变更
28
隐藏空白更改
内联
并排
Showing
28 changed file
with
278 addition
and
70 deletion
+278
-70
src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java
src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java
+10
-2
src/share/classes/com/sun/corba/se/impl/corba/TypeCodeImpl.java
...are/classes/com/sun/corba/se/impl/corba/TypeCodeImpl.java
+3
-2
src/share/classes/com/sun/corba/se/impl/encoding/IDLJavaSerializationOutputStream.java
...ba/se/impl/encoding/IDLJavaSerializationOutputStream.java
+2
-2
src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeOutputStream.java
.../com/sun/corba/se/impl/encoding/TypeCodeOutputStream.java
+5
-3
src/share/classes/com/sun/corba/se/impl/interceptors/CDREncapsCodec.java
...es/com/sun/corba/se/impl/interceptors/CDREncapsCodec.java
+3
-2
src/share/classes/com/sun/corba/se/impl/interceptors/RequestInfoImpl.java
...s/com/sun/corba/se/impl/interceptors/RequestInfoImpl.java
+4
-3
src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java
...are/classes/com/sun/corba/se/impl/io/IIOPInputStream.java
+4
-4
src/share/classes/com/sun/corba/se/impl/io/IIOPOutputStream.java
...re/classes/com/sun/corba/se/impl/io/IIOPOutputStream.java
+5
-5
src/share/classes/com/sun/corba/se/impl/io/InputStreamHook.java
...are/classes/com/sun/corba/se/impl/io/InputStreamHook.java
+1
-1
src/share/classes/com/sun/corba/se/impl/io/OutputStreamHook.java
...re/classes/com/sun/corba/se/impl/io/OutputStreamHook.java
+1
-1
src/share/classes/com/sun/corba/se/impl/ior/EncapsulationUtility.java
...asses/com/sun/corba/se/impl/ior/EncapsulationUtility.java
+2
-1
src/share/classes/com/sun/corba/se/impl/ior/GenericTaggedProfile.java
...asses/com/sun/corba/se/impl/ior/GenericTaggedProfile.java
+3
-2
src/share/classes/com/sun/corba/se/impl/ior/IORImpl.java
src/share/classes/com/sun/corba/se/impl/ior/IORImpl.java
+5
-3
src/share/classes/com/sun/corba/se/impl/ior/ObjectKeyImpl.java
...hare/classes/com/sun/corba/se/impl/ior/ObjectKeyImpl.java
+2
-1
src/share/classes/com/sun/corba/se/impl/ior/TaggedComponentFactoryFinderImpl.java
...n/corba/se/impl/ior/TaggedComponentFactoryFinderImpl.java
+3
-2
src/share/classes/com/sun/corba/se/impl/ior/iiop/IIOPProfileImpl.java
...asses/com/sun/corba/se/impl/ior/iiop/IIOPProfileImpl.java
+3
-2
src/share/classes/com/sun/corba/se/impl/ior/iiop/IIOPProfileTemplateImpl.java
...m/sun/corba/se/impl/ior/iiop/IIOPProfileTemplateImpl.java
+4
-3
src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java
src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java
+1
-1
src/share/classes/com/sun/corba/se/impl/orb/ORBSingleton.java
...share/classes/com/sun/corba/se/impl/orb/ORBSingleton.java
+2
-2
src/share/classes/com/sun/corba/se/impl/protocol/CorbaMessageMediatorImpl.java
.../sun/corba/se/impl/protocol/CorbaMessageMediatorImpl.java
+10
-12
src/share/classes/com/sun/corba/se/impl/transport/CorbaContactInfoBase.java
...com/sun/corba/se/impl/transport/CorbaContactInfoBase.java
+2
-2
src/share/classes/com/sun/corba/se/impl/transport/SharedCDRContactInfoImpl.java
...sun/corba/se/impl/transport/SharedCDRContactInfoImpl.java
+2
-2
src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelAcceptorImpl.java
.../corba/se/impl/transport/SocketOrChannelAcceptorImpl.java
+4
-4
src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelConnectionImpl.java
...orba/se/impl/transport/SocketOrChannelConnectionImpl.java
+3
-3
src/share/classes/com/sun/corba/se/spi/ior/TaggedComponentBase.java
...classes/com/sun/corba/se/spi/ior/TaggedComponentBase.java
+3
-2
src/share/classes/com/sun/corba/se/spi/servicecontext/ServiceContext.java
...s/com/sun/corba/se/spi/servicecontext/ServiceContext.java
+3
-2
src/share/classes/org/omg/CORBA_2_3/portable/OutputStream.java
...hare/classes/org/omg/CORBA_2_3/portable/OutputStream.java
+39
-1
src/share/classes/sun/corba/OutputStreamFactory.java
src/share/classes/sun/corba/OutputStreamFactory.java
+149
-0
未找到文件。
src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java
浏览文件 @
96a1305a
/*
* Copyright (c) 1997, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -33,6 +33,8 @@ package com.sun.corba.se.impl.corba;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.security.AccessController
;
import
java.security.PrivilegedAction
;
import
java.util.List
;
import
java.util.ArrayList
;
...
...
@@ -504,7 +506,13 @@ public class AnyImpl extends Any
public
org
.
omg
.
CORBA
.
portable
.
OutputStream
create_output_stream
()
{
//debug.log ("create_output_stream");
return
new
AnyOutputStream
(
orb
);
final
ORB
finalorb
=
this
.
orb
;
return
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
AnyOutputStream
>()
{
@Override
public
AnyOutputStream
run
()
{
return
new
AnyOutputStream
(
finalorb
);
}
});
}
/**
...
...
src/share/classes/com/sun/corba/se/impl/corba/TypeCodeImpl.java
浏览文件 @
96a1305a
/*
* Copyright (c) 1996, 20
06
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 20
13
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -600,7 +600,8 @@ public final class TypeCodeImpl extends TypeCode
}
public
static
CDROutputStream
newOutputStream
(
ORB
orb
)
{
TypeCodeOutputStream
tcos
=
new
TypeCodeOutputStream
((
ORB
)
orb
);
TypeCodeOutputStream
tcos
=
sun
.
corba
.
OutputStreamFactory
.
newTypeCodeOutputStream
(
orb
);
//if (debug) System.out.println("Created TypeCodeOutputStream " + tcos +
// " with no parent");
return
tcos
;
...
...
src/share/classes/com/sun/corba/se/impl/encoding/IDLJavaSerializationOutputStream.java
浏览文件 @
96a1305a
/*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004,
2013,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -66,7 +66,7 @@ import org.omg.CORBA.CompletionStatus;
*
* @author Ram Jeyaraman
*/
public
class
IDLJavaSerializationOutputStream
extends
CDROutputStreamBase
{
final
class
IDLJavaSerializationOutputStream
extends
CDROutputStreamBase
{
private
ORB
orb
;
private
byte
encodingVersion
;
...
...
src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeOutputStream.java
浏览文件 @
96a1305a
/*
* Copyright (c) 2002, 20
0
3, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 20
1
3, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -196,7 +196,8 @@ public final class TypeCodeOutputStream extends EncapsOutputStream
}
public
TypeCodeOutputStream
createEncapsulation
(
org
.
omg
.
CORBA
.
ORB
_orb
)
{
TypeCodeOutputStream
encap
=
new
TypeCodeOutputStream
((
ORB
)
_orb
,
isLittleEndian
());
TypeCodeOutputStream
encap
=
sun
.
corba
.
OutputStreamFactory
.
newTypeCodeOutputStream
((
ORB
)
_orb
,
isLittleEndian
());
encap
.
setEnclosingOutputStream
(
this
);
encap
.
makeEncapsulation
();
//if (TypeCodeImpl.debug) System.out.println("Created TypeCodeOutputStream " + encap + " with parent " + this);
...
...
@@ -211,7 +212,8 @@ public final class TypeCodeOutputStream extends EncapsOutputStream
public
static
TypeCodeOutputStream
wrapOutputStream
(
OutputStream
os
)
{
boolean
littleEndian
=
((
os
instanceof
CDROutputStream
)
?
((
CDROutputStream
)
os
).
isLittleEndian
()
:
false
);
TypeCodeOutputStream
tos
=
new
TypeCodeOutputStream
((
ORB
)
os
.
orb
(),
littleEndian
);
TypeCodeOutputStream
tos
=
sun
.
corba
.
OutputStreamFactory
.
newTypeCodeOutputStream
((
ORB
)
os
.
orb
(),
littleEndian
);
tos
.
setEnclosingOutputStream
(
os
);
//if (TypeCodeImpl.debug) System.out.println("Created TypeCodeOutputStream " + tos + " with parent " + os);
return
tos
;
...
...
src/share/classes/com/sun/corba/se/impl/interceptors/CDREncapsCodec.java
浏览文件 @
96a1305a
/*
* Copyright (c) 2000, 20
0
3, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 20
1
3, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -155,7 +155,8 @@ public final class CDREncapsCodec
// be versioned. This can be handled once this work is complete.
// Create output stream with default endianness.
EncapsOutputStream
cdrOut
=
new
EncapsOutputStream
(
EncapsOutputStream
cdrOut
=
sun
.
corba
.
OutputStreamFactory
.
newEncapsOutputStream
(
(
com
.
sun
.
corba
.
se
.
spi
.
orb
.
ORB
)
orb
,
giopVersion
);
// This is an encapsulation, so put out the endian:
...
...
src/share/classes/com/sun/corba/se/impl/interceptors/RequestInfoImpl.java
浏览文件 @
96a1305a
...
...
@@ -659,7 +659,8 @@ public abstract class RequestInfoImpl
// Convert the "core" service context to an
// "IOP" ServiceContext by writing it to a
// CDROutputStream and reading it back.
EncapsOutputStream
out
=
new
EncapsOutputStream
(
myORB
);
EncapsOutputStream
out
=
sun
.
corba
.
OutputStreamFactory
.
newEncapsOutputStream
(
myORB
);
context
.
write
(
out
,
GIOPVersion
.
V1_2
);
InputStream
inputStream
=
out
.
create_input_stream
();
...
...
@@ -695,8 +696,8 @@ public abstract class RequestInfoImpl
{
int
id
=
0
;
// Convert IOP.service_context to core.ServiceContext:
EncapsOutputStream
outputStream
=
new
EncapsOutputStream
(
myORB
);
EncapsOutputStream
outputStream
=
sun
.
corba
.
OutputStreamFactory
.
newEncapsOutputStream
(
myORB
);
InputStream
inputStream
=
null
;
UnknownServiceContext
coreServiceContext
=
null
;
ServiceContextHelper
.
write
(
outputStream
,
service_context
);
...
...
src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java
浏览文件 @
96a1305a
...
...
@@ -300,11 +300,11 @@ public class IIOPInputStream
resetStream
();
}
public
final
void
setOrbStream
(
org
.
omg
.
CORBA_2_3
.
portable
.
InputStream
os
)
{
final
void
setOrbStream
(
org
.
omg
.
CORBA_2_3
.
portable
.
InputStream
os
)
{
orbStream
=
os
;
}
public
final
org
.
omg
.
CORBA_2_3
.
portable
.
InputStream
getOrbStream
()
{
final
org
.
omg
.
CORBA_2_3
.
portable
.
InputStream
getOrbStream
()
{
return
orbStream
;
}
...
...
@@ -327,11 +327,11 @@ public class IIOPInputStream
return
(
javax
.
rmi
.
CORBA
.
ValueHandler
)
vhandler
;
}
public
final
void
increaseRecursionDepth
(){
final
void
increaseRecursionDepth
(){
recursionDepth
++;
}
public
final
int
decreaseRecursionDepth
(){
final
int
decreaseRecursionDepth
(){
return
--
recursionDepth
;
}
...
...
src/share/classes/com/sun/corba/se/impl/io/IIOPOutputStream.java
浏览文件 @
96a1305a
/*
* Copyright (c) 1998, 20
04
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 20
13
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -124,19 +124,19 @@ public class IIOPOutputStream
}
}
public
final
void
setOrbStream
(
org
.
omg
.
CORBA_2_3
.
portable
.
OutputStream
os
)
{
final
void
setOrbStream
(
org
.
omg
.
CORBA_2_3
.
portable
.
OutputStream
os
)
{
orbStream
=
os
;
}
public
final
org
.
omg
.
CORBA_2_3
.
portable
.
OutputStream
getOrbStream
()
{
final
org
.
omg
.
CORBA_2_3
.
portable
.
OutputStream
getOrbStream
()
{
return
orbStream
;
}
public
final
void
increaseRecursionDepth
(){
final
void
increaseRecursionDepth
(){
recursionDepth
++;
}
public
final
int
decreaseRecursionDepth
(){
final
int
decreaseRecursionDepth
(){
return
--
recursionDepth
;
}
...
...
src/share/classes/com/sun/corba/se/impl/io/InputStreamHook.java
浏览文件 @
96a1305a
...
...
@@ -251,7 +251,7 @@ public abstract class InputStreamHook extends ObjectInputStream
}
protected
abstract
byte
getStreamFormatVersion
();
protected
abstract
org
.
omg
.
CORBA_2_3
.
portable
.
InputStream
getOrbStream
();
abstract
org
.
omg
.
CORBA_2_3
.
portable
.
InputStream
getOrbStream
();
// Description of possible actions
protected
static
class
ReadObjectState
{
...
...
src/share/classes/com/sun/corba/se/impl/io/OutputStreamHook.java
浏览文件 @
96a1305a
...
...
@@ -179,7 +179,7 @@ public abstract class OutputStreamHook extends ObjectOutputStream
putFields
.
write
(
this
);
}
public
abstract
org
.
omg
.
CORBA_2_3
.
portable
.
OutputStream
getOrbStream
();
abstract
org
.
omg
.
CORBA_2_3
.
portable
.
OutputStream
getOrbStream
();
protected
abstract
void
beginOptionalCustomData
();
...
...
src/share/classes/com/sun/corba/se/impl/ior/EncapsulationUtility.java
浏览文件 @
96a1305a
...
...
@@ -128,7 +128,8 @@ public class EncapsulationUtility
static
public
void
writeEncapsulation
(
WriteContents
obj
,
OutputStream
os
)
{
EncapsOutputStream
out
=
new
EncapsOutputStream
(
(
ORB
)
os
.
orb
()
)
;
EncapsOutputStream
out
=
sun
.
corba
.
OutputStreamFactory
.
newEncapsOutputStream
((
ORB
)
os
.
orb
());
out
.
putEndian
()
;
...
...
src/share/classes/com/sun/corba/se/impl/ior/GenericTaggedProfile.java
浏览文件 @
96a1305a
/*
* Copyright (c) 2000, 20
0
3, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 20
1
3, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -95,7 +95,8 @@ public class GenericTaggedProfile extends GenericIdentifiable implements TaggedP
public
org
.
omg
.
IOP
.
TaggedProfile
getIOPProfile
()
{
EncapsOutputStream
os
=
new
EncapsOutputStream
(
orb
)
;
EncapsOutputStream
os
=
sun
.
corba
.
OutputStreamFactory
.
newEncapsOutputStream
(
orb
);
write
(
os
)
;
InputStream
is
=
(
InputStream
)(
os
.
create_input_stream
())
;
return
org
.
omg
.
IOP
.
TaggedProfileHelper
.
read
(
is
)
;
...
...
src/share/classes/com/sun/corba/se/impl/ior/IORImpl.java
浏览文件 @
96a1305a
/*
* Copyright (c) 2000, 20
06
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 20
13
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -213,7 +213,8 @@ public class IORImpl extends IdentifiableContainerBase implements IOR
{
StringWriter
bs
;
MarshalOutputStream
s
=
new
EncapsOutputStream
(
factory
);
MarshalOutputStream
s
=
sun
.
corba
.
OutputStreamFactory
.
newEncapsOutputStream
(
factory
);
s
.
putEndian
();
write
(
(
OutputStream
)
s
);
bs
=
new
StringWriter
();
...
...
@@ -237,7 +238,8 @@ public class IORImpl extends IdentifiableContainerBase implements IOR
}
public
org
.
omg
.
IOP
.
IOR
getIOPIOR
()
{
EncapsOutputStream
os
=
new
EncapsOutputStream
(
factory
);
EncapsOutputStream
os
=
sun
.
corba
.
OutputStreamFactory
.
newEncapsOutputStream
(
factory
);
write
(
os
);
InputStream
is
=
(
InputStream
)
(
os
.
create_input_stream
());
return
org
.
omg
.
IOP
.
IORHelper
.
read
(
is
);
...
...
src/share/classes/com/sun/corba/se/impl/ior/ObjectKeyImpl.java
浏览文件 @
96a1305a
...
...
@@ -87,7 +87,8 @@ public class ObjectKeyImpl implements ObjectKey
public
byte
[]
getBytes
(
org
.
omg
.
CORBA
.
ORB
orb
)
{
EncapsOutputStream
os
=
new
EncapsOutputStream
(
(
ORB
)
orb
)
;
EncapsOutputStream
os
=
sun
.
corba
.
OutputStreamFactory
.
newEncapsOutputStream
((
ORB
)
orb
);
write
(
os
)
;
return
os
.
toByteArray
()
;
}
...
...
src/share/classes/com/sun/corba/se/impl/ior/TaggedComponentFactoryFinderImpl.java
浏览文件 @
96a1305a
/*
* Copyright (c) 2000, 20
0
3, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 20
1
3, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -61,7 +61,8 @@ public class TaggedComponentFactoryFinderImpl extends
public
TaggedComponent
create
(
org
.
omg
.
CORBA
.
ORB
orb
,
org
.
omg
.
IOP
.
TaggedComponent
comp
)
{
EncapsOutputStream
os
=
new
EncapsOutputStream
(
(
ORB
)
orb
)
;
EncapsOutputStream
os
=
sun
.
corba
.
OutputStreamFactory
.
newEncapsOutputStream
((
ORB
)
orb
);
org
.
omg
.
IOP
.
TaggedComponentHelper
.
write
(
os
,
comp
)
;
InputStream
is
=
(
InputStream
)(
os
.
create_input_stream
()
)
;
// Skip the component ID: we just wrote it out above
...
...
src/share/classes/com/sun/corba/se/impl/ior/iiop/IIOPProfileImpl.java
浏览文件 @
96a1305a
/*
* Copyright (c) 2000, 20
04
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 20
13
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -247,7 +247,8 @@ public class IIOPProfileImpl extends IdentifiableBase implements IIOPProfile
public
org
.
omg
.
IOP
.
TaggedProfile
getIOPProfile
()
{
EncapsOutputStream
os
=
new
EncapsOutputStream
(
orb
)
;
EncapsOutputStream
os
=
sun
.
corba
.
OutputStreamFactory
.
newEncapsOutputStream
(
orb
);
os
.
write_long
(
getId
()
)
;
write
(
os
)
;
InputStream
is
=
(
InputStream
)(
os
.
create_input_stream
())
;
...
...
src/share/classes/com/sun/corba/se/impl/ior/iiop/IIOPProfileTemplateImpl.java
浏览文件 @
96a1305a
/*
* Copyright (c) 2000, 20
0
3, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 20
1
3, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -132,8 +132,9 @@ public class IIOPProfileTemplateImpl extends TaggedProfileTemplateBase
// Note that this cannot be accomplished with a codec!
// Use the byte order of the given stream
OutputStream
encapsulatedOS
=
new
EncapsOutputStream
(
(
ORB
)
os
.
orb
(),
((
CDROutputStream
)
os
).
isLittleEndian
()
)
;
OutputStream
encapsulatedOS
=
sun
.
corba
.
OutputStreamFactory
.
newEncapsOutputStream
(
(
ORB
)
os
.
orb
(),
((
CDROutputStream
)
os
).
isLittleEndian
()
)
;
okeyTemplate
.
write
(
id
,
encapsulatedOS
)
;
EncapsulationUtility
.
writeOutputStream
(
encapsulatedOS
,
os
)
;
...
...
src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java
浏览文件 @
96a1305a
...
...
@@ -550,7 +550,7 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public
synchronized
org
.
omg
.
CORBA
.
portable
.
OutputStream
create_output_stream
()
{
checkShutdownState
();
return
new
EncapsOutputStream
(
this
);
return
sun
.
corba
.
OutputStreamFactory
.
new
EncapsOutputStream
(
this
);
}
/**
...
...
src/share/classes/com/sun/corba/se/impl/orb/ORBSingleton.java
浏览文件 @
96a1305a
/*
* Copyright (c) 1997, 20
09
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 20
13
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -149,7 +149,7 @@ public class ORBSingleton extends ORB
}
public
OutputStream
create_output_stream
()
{
return
new
EncapsOutputStream
(
this
);
return
sun
.
corba
.
OutputStreamFactory
.
new
EncapsOutputStream
(
this
);
}
public
TypeCode
create_struct_tc
(
String
id
,
...
...
src/share/classes/com/sun/corba/se/impl/protocol/CorbaMessageMediatorImpl.java
浏览文件 @
96a1305a
/*
* Copyright (c) 2001, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -1794,8 +1794,7 @@ public class CorbaMessageMediatorImpl
if
(
msg
.
getGIOPVersion
().
lessThan
(
GIOPVersion
.
V1_2
))
{
// locate msgs 1.0 & 1.1 :=> grow,
// REVISIT - build from factory
outputObject
=
new
CDROutputObject
(
outputObject
=
sun
.
corba
.
OutputStreamFactory
.
newCDROutputObject
(
(
ORB
)
messageMediator
.
getBroker
(),
this
,
GIOPVersion
.
V1_0
,
...
...
@@ -1804,8 +1803,7 @@ public class CorbaMessageMediatorImpl
ORBConstants
.
STREAM_FORMAT_VERSION_1
);
}
else
{
// 1.2 :=> stream
// REVISIT - build from factory
outputObject
=
new
CDROutputObject
(
outputObject
=
sun
.
corba
.
OutputStreamFactory
.
newCDROutputObject
(
(
ORB
)
messageMediator
.
getBroker
(),
messageMediator
,
reply
,
...
...
@@ -1959,7 +1957,8 @@ public class CorbaMessageMediatorImpl
ReplyMessage
.
NEEDS_ADDRESSING_MODE
,
null
,
null
);
// REVISIT: via acceptor factory.
CDROutputObject
outputObject
=
new
CDROutputObject
(
CDROutputObject
outputObject
=
sun
.
corba
.
OutputStreamFactory
.
newCDROutputObject
(
(
ORB
)
messageMediator
.
getBroker
(),
this
,
messageMediator
.
getGIOPVersion
(),
...
...
@@ -2126,7 +2125,7 @@ public class CorbaMessageMediatorImpl
ex
.
printStackTrace
(
pw
);
pw
.
flush
();
// NOTE: you must flush or baos will be empty.
EncapsOutputStream
encapsOutputStream
=
new
EncapsOutputStream
((
ORB
)
mediator
.
getBroker
());
sun
.
corba
.
OutputStreamFactory
.
new
EncapsOutputStream
((
ORB
)
mediator
.
getBroker
());
encapsOutputStream
.
putEndian
();
encapsOutputStream
.
write_wstring
(
baos
.
toString
());
UnknownServiceContext
serviceContext
=
...
...
@@ -2203,12 +2202,11 @@ public class CorbaMessageMediatorImpl
// REVISIT = do not use null.
//
if
(
messageMediator
.
getConnection
()
==
null
)
{
// REVISIT - needs factory
replyOutputObject
=
new
CDROutputObject
(
orb
,
messageMediator
,
messageMediator
.
getReplyHeader
(),
messageMediator
.
getStreamFormatVersion
(),
BufferManagerFactory
.
GROW
);
sun
.
corba
.
OutputStreamFactory
.
newCDROutputObject
(
orb
,
messageMediator
,
messageMediator
.
getReplyHeader
(),
messageMediator
.
getStreamFormatVersion
(),
BufferManagerFactory
.
GROW
);
}
else
{
replyOutputObject
=
messageMediator
.
getConnection
().
getAcceptor
()
.
createOutputObject
(
messageMediator
.
getBroker
(),
messageMediator
);
...
...
src/share/classes/com/sun/corba/se/impl/transport/CorbaContactInfoBase.java
浏览文件 @
96a1305a
/*
* Copyright (c) 2003, 20
04
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 20
13
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -214,7 +214,7 @@ public abstract class CorbaContactInfoBase
messageMediator
;
OutputObject
outputObject
=
new
CDROutputObject
(
orb
,
messageMediator
,
sun
.
corba
.
OutputStreamFactory
.
new
CDROutputObject
(
orb
,
messageMediator
,
corbaMessageMediator
.
getRequestHeader
(),
corbaMessageMediator
.
getStreamFormatVersion
());
...
...
src/share/classes/com/sun/corba/se/impl/transport/SharedCDRContactInfoImpl.java
浏览文件 @
96a1305a
/*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003,
2013,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -134,7 +134,7 @@ public class SharedCDRContactInfoImpl
messageMediator
;
// NOTE: GROW.
OutputObject
outputObject
=
new
CDROutputObject
(
orb
,
messageMediator
,
sun
.
corba
.
OutputStreamFactory
.
new
CDROutputObject
(
orb
,
messageMediator
,
corbaMessageMediator
.
getRequestHeader
(),
corbaMessageMediator
.
getStreamFormatVersion
(),
BufferManagerFactory
.
GROW
);
...
...
src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelAcceptorImpl.java
浏览文件 @
96a1305a
/*
* Copyright (c) 2001, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -534,9 +534,9 @@ public class SocketOrChannelAcceptorImpl
{
CorbaMessageMediator
corbaMessageMediator
=
(
CorbaMessageMediator
)
messageMediator
;
return
new
CDROutputObject
((
ORB
)
broker
,
corbaMessageMediato
r
,
corbaMessageMediator
.
getReplyHeader
(),
corbaMessageMediator
.
getStreamFormatVersion
());
return
sun
.
corba
.
OutputStreamFactory
.
newCDROutputObject
((
ORB
)
broke
r
,
corbaMessageMediator
,
corbaMessageMediator
.
getReplyHeader
(),
corbaMessageMediator
.
getStreamFormatVersion
());
}
////////////////////////////////////////////////////
...
...
src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelConnectionImpl.java
浏览文件 @
96a1305a
/*
* Copyright (c) 2001, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -1587,8 +1587,8 @@ public class SocketOrChannelConnectionImpl
{
// REVISIT: See comments in CDROutputObject constructor.
CDROutputObject
outputObject
=
new
CDROutputObject
((
ORB
)
orb
,
null
,
giopVersion
,
this
,
msg
,
ORBConstants
.
STREAM_FORMAT_VERSION_1
);
sun
.
corba
.
OutputStreamFactory
.
newCDROutputObject
((
ORB
)
orb
,
null
,
giopVersion
,
this
,
msg
,
ORBConstants
.
STREAM_FORMAT_VERSION_1
);
msg
.
write
(
outputObject
);
outputObject
.
writeTo
(
this
);
...
...
src/share/classes/com/sun/corba/se/spi/ior/TaggedComponentBase.java
浏览文件 @
96a1305a
/*
* Copyright (c) 2000, 20
0
3, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 20
1
3, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -42,7 +42,8 @@ public abstract class TaggedComponentBase extends IdentifiableBase
public
org
.
omg
.
IOP
.
TaggedComponent
getIOPComponent
(
org
.
omg
.
CORBA
.
ORB
orb
)
{
EncapsOutputStream
os
=
new
EncapsOutputStream
(
(
ORB
)
orb
)
;
EncapsOutputStream
os
=
sun
.
corba
.
OutputStreamFactory
.
newEncapsOutputStream
((
ORB
)
orb
);
write
(
os
)
;
InputStream
is
=
(
InputStream
)(
os
.
create_input_stream
()
)
;
return
org
.
omg
.
IOP
.
TaggedComponentHelper
.
read
(
is
)
;
...
...
src/share/classes/com/sun/corba/se/spi/servicecontext/ServiceContext.java
浏览文件 @
96a1305a
/*
* Copyright (c) 1998, 20
0
3, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 20
1
3, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -92,7 +92,8 @@ public abstract class ServiceContext {
*/
public
void
write
(
OutputStream
s
,
GIOPVersion
gv
)
throws
SystemException
{
EncapsOutputStream
os
=
new
EncapsOutputStream
(
(
ORB
)(
s
.
orb
()),
gv
)
;
EncapsOutputStream
os
=
sun
.
corba
.
OutputStreamFactory
.
newEncapsOutputStream
((
ORB
)(
s
.
orb
()),
gv
);
os
.
putEndian
()
;
writeData
(
os
)
;
byte
[]
data
=
os
.
toByteArray
()
;
...
...
src/share/classes/org/omg/CORBA_2_3/portable/OutputStream.java
浏览文件 @
96a1305a
/*
* Copyright (c) 1998, 20
00
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 20
13
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -31,6 +31,10 @@
package
org.omg.CORBA_2_3.portable
;
import
java.io.SerializablePermission
;
import
java.security.AccessController
;
import
java.security.PrivilegedAction
;
/**
* OutputStream provides interface for writing of all of the mapped IDL type
* to the stream. It extends org.omg.CORBA.portable.OutputStream, and defines
...
...
@@ -43,6 +47,40 @@ package org.omg.CORBA_2_3.portable;
public
abstract
class
OutputStream
extends
org
.
omg
.
CORBA
.
portable
.
OutputStream
{
private
static
final
String
ALLOW_SUBCLASS_PROP
=
"jdk.corba.allowOutputStreamSubclass"
;
private
static
final
boolean
allowSubclass
=
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
Boolean
>()
{
@Override
public
Boolean
run
()
{
String
prop
=
System
.
getProperty
(
ALLOW_SUBCLASS_PROP
);
return
prop
==
null
?
false
:
(
prop
.
equalsIgnoreCase
(
"false"
)
?
false
:
true
);
}
});
private
static
Void
checkPermission
()
{
SecurityManager
sm
=
System
.
getSecurityManager
();
if
(
sm
!=
null
)
{
if
(!
allowSubclass
)
sm
.
checkPermission
(
new
SerializablePermission
(
"enableSubclassImplementation"
));
}
return
null
;
}
private
OutputStream
(
Void
ignore
)
{
}
/**
* Create a new instance of this class.
*
* throw SecurityException if SecurityManager is installed and
* enableSubclassImplementation SerializablePermission
* is not granted or jdk.corba.allowOutputStreamSubclass system
* property is either not set or is set to 'false'
*/
public
OutputStream
()
{
this
(
checkPermission
());
}
/**
* Marshals a value type to the output stream.
* @param value is the acutal value to write
...
...
src/share/classes/sun/corba/OutputStreamFactory.java
0 → 100644
浏览文件 @
96a1305a
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
sun.corba
;
import
com.sun.corba.se.impl.corba.AnyImpl
;
import
com.sun.corba.se.impl.encoding.BufferManagerWrite
;
import
com.sun.corba.se.impl.encoding.CDROutputObject
;
import
com.sun.corba.se.impl.encoding.EncapsOutputStream
;
import
com.sun.corba.se.impl.encoding.TypeCodeOutputStream
;
import
com.sun.corba.se.impl.protocol.giopmsgheaders.Message
;
import
com.sun.corba.se.pept.protocol.MessageMediator
;
import
com.sun.corba.se.spi.orb.ORB
;
import
com.sun.corba.se.spi.transport.CorbaConnection
;
import
com.sun.corba.se.spi.ior.iiop.GIOPVersion
;
import
com.sun.corba.se.spi.protocol.CorbaMessageMediator
;
import
java.security.AccessController
;
import
java.security.PrivilegedAction
;
public
final
class
OutputStreamFactory
{
private
OutputStreamFactory
()
{
}
public
static
TypeCodeOutputStream
newTypeCodeOutputStream
(
final
ORB
orb
)
{
return
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
TypeCodeOutputStream
>()
{
@Override
public
TypeCodeOutputStream
run
()
{
return
new
TypeCodeOutputStream
(
orb
);
}
});
}
public
static
TypeCodeOutputStream
newTypeCodeOutputStream
(
final
ORB
orb
,
final
boolean
littleEndian
)
{
return
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
TypeCodeOutputStream
>()
{
@Override
public
TypeCodeOutputStream
run
()
{
return
new
TypeCodeOutputStream
(
orb
,
littleEndian
);
}
});
}
public
static
EncapsOutputStream
newEncapsOutputStream
(
final
ORB
orb
)
{
return
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
EncapsOutputStream
>()
{
@Override
public
EncapsOutputStream
run
()
{
return
new
EncapsOutputStream
(
(
com
.
sun
.
corba
.
se
.
spi
.
orb
.
ORB
)
orb
);
}
});
}
public
static
EncapsOutputStream
newEncapsOutputStream
(
final
ORB
orb
,
final
GIOPVersion
giopVersion
)
{
return
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
EncapsOutputStream
>()
{
@Override
public
EncapsOutputStream
run
()
{
return
new
EncapsOutputStream
(
(
com
.
sun
.
corba
.
se
.
spi
.
orb
.
ORB
)
orb
,
giopVersion
);
}
});
}
public
static
EncapsOutputStream
newEncapsOutputStream
(
final
ORB
orb
,
final
boolean
isLittleEndian
)
{
return
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
EncapsOutputStream
>()
{
@Override
public
EncapsOutputStream
run
()
{
return
new
EncapsOutputStream
(
(
com
.
sun
.
corba
.
se
.
spi
.
orb
.
ORB
)
orb
,
isLittleEndian
);
}
});
}
public
static
CDROutputObject
newCDROutputObject
(
final
ORB
orb
,
final
MessageMediator
messageMediator
,
final
Message
header
,
final
byte
streamFormatVersion
)
{
return
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
CDROutputObject
>()
{
@Override
public
CDROutputObject
run
()
{
return
new
CDROutputObject
(
orb
,
messageMediator
,
header
,
streamFormatVersion
);
}
});
}
public
static
CDROutputObject
newCDROutputObject
(
final
ORB
orb
,
final
MessageMediator
messageMediator
,
final
Message
header
,
final
byte
streamFormatVersion
,
final
int
strategy
)
{
return
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
CDROutputObject
>()
{
@Override
public
CDROutputObject
run
()
{
return
new
CDROutputObject
(
orb
,
messageMediator
,
header
,
streamFormatVersion
,
strategy
);
}
});
}
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
);
}
});
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录