本文整理了Java中org.omg.IOP.Encoding
类的一些代码示例,展示了Encoding
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Encoding
类的具体详情如下:
包路径:org.omg.IOP.Encoding
类名称:Encoding
暂无
代码示例来源:origin: wildfly/wildfly
public void post_init(ORBInitInfo info) {
try {
// Use CDR encapsulation with GIOP 1.0 encoding
Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
(byte) 1, /* GIOP version */
(byte) 0 /* GIOP revision*/);
Codec codec = info.codec_factory().create_codec(encoding);
// Get a reference to the PICurrent
org.omg.CORBA.Object obj =
info.resolve_initial_references("PICurrent");
org.omg.PortableInterceptor.Current piCurrent =
org.omg.PortableInterceptor.CurrentHelper.narrow(obj);
// Initialize the fields slot id, codec, and piCurrent
// in the interceptor class
TxServerInterceptor.init(info.allocate_slot_id(), codec, piCurrent);
// Create and register interceptor
TxServerInterceptor interceptor = new TxServerInterceptor();
info.add_server_request_interceptor(interceptor);
} catch (Exception e) {
throw IIOPLogger.ROOT_LOGGER.unexpectedException(e);
}
}
代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj
int localSlot = init_info.allocate_slot_id();
int receivedSlot = init_info.allocate_slot_id();
Encoding cdr_encoding = new Encoding(ENCODING_CDR_ENCAPS.value, (byte)1, (byte)2);
cdr_codec = init_info.codec_factory().create_codec(cdr_encoding);
"ContextORBInitializerImpl", "ENCODING_CDR_ENCAPS", ex);
throw new FatalError(jtsLogger.i18NLogger.get_orbspecific_javaidl_interceptors_context_codeccreate(), ex);
"ContextORBInitializerImpl", "ClientRequestInterceptor", ex);
throw new FatalError(jtsLogger.i18NLogger.get_orbspecific_javaidl_interceptors_context_cie(), ex);
"ContextORBInitializerImpl", "ServerRequestInterceptor", ex);
throw new FatalError(jtsLogger.i18NLogger.get_orbspecific_javaidl_interceptors_context_sie(), ex);
代码示例来源:origin: wildfly/wildfly
public void post_init(ORBInitInfo info) {
try {
// Use CDR encapsulation with GIOP 1.0 encoding
Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
(byte) 1, /* GIOP version */
(byte) 0 /* GIOP revision*/);
Codec codec = info.codec_factory().create_codec(encoding);
info.add_ior_interceptor(new TxIORInterceptor(codec));
} catch (Exception e) {
throw IIOPLogger.ROOT_LOGGER.unexpectedException(e);
}
}
}
代码示例来源:origin: org.glassfish.main.transaction/jts
CodecFactory codecFactory = info.codec_factory();
Encoding enc = new Encoding(
ENCODING_CDR_ENCAPS.value, (byte) 1, (byte) 2);
Codec codec = null;
try {
codec = codecFactory.create_codec(enc);
} catch (UnknownEncoding e) {
throw new INTERNAL(MinorCode.TSCreateFailed,
pic = (Current) info.resolve_initial_references("PICurrent");
} catch (InvalidName e) {
throw new INTERNAL(MinorCode.TSCreateFailed,
slotIds[0] = info.allocate_slot_id();
slotIds[1] = info.allocate_slot_id();
} catch (BAD_INV_ORDER e) {
代码示例来源:origin: org.jacorb/jacorb-services
((org.jacorb.orb.ORB)orb).getConfiguration()
.getLogger("org.jacorb.tx_service");
slot_id = info.allocate_slot_id();
Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
(byte) 1, (byte) 0);
Codec codec = info.codec_factory().create_codec(encoding);
info.register_initial_reference("TransactionCurrent", ts_current);
info.add_client_request_interceptor(
代码示例来源:origin: org.apache.yoko/yoko-core
codec = info.codec_factory()
.create_codec(
new Encoding(ENCODING_CDR_ENCAPS.value, (byte) 1,
(byte) 2));
info.register_policy_factory(SecMechanismsPolicy.value, factory);
info.register_policy_factory(SecInvocationCredentialsPolicy.value,
factory);
info.register_policy_factory(SecQOPPolicy.value, factory);
代码示例来源:origin: org.jacorb/jacorb
public SASTargetInterceptor(ORBInitInfo info)
throws UnknownEncoding, ConfigurationException
{
sasReplySlotID = info.allocate_slot_id();
sasContextsCubby = org.jacorb.orb.giop.GIOPConnection.allocate_cubby_id();
Encoding encoding =
new Encoding(ENCODING_CDR_ENCAPS.value, (byte) 1, (byte) 0);
codec =
info.codec_factory().create_codec(encoding);
orb = ((org.jacorb.orb.portableInterceptor.ORBInitInfoImpl)info).getORB ();
configure( orb.getConfiguration());
}
代码示例来源:origin: org.jacorb/jacorb
public SASClientInterceptor(ORBInitInfo info)
throws UnknownEncoding, ConfigurationException
{
name = DEFAULT_NAME;
Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value, (byte) 1, (byte) 0);
codec = info.codec_factory().create_codec(encoding);
org.jacorb.orb.ORB orb =
((org.jacorb.orb.portableInterceptor.ORBInitInfoImpl)info).getORB ();
configure( orb.getConfiguration());
}
代码示例来源:origin: org.jacorb/jacorb
public SASComponentInterceptor(ORBInitInfo info)
{
super();
orb = ((org.jacorb.orb.portableInterceptor.ORBInitInfoImpl)info).getORB();
config = orb.getConfiguration();
logger = config.getLogger("org.jacorb.SAS.IOR");
try
{
Encoding encoding =
new Encoding(ENCODING_CDR_ENCAPS.value, (byte) 1, (byte) 0);
CodecFactory codec_factory =
(CodecFactory)orb.resolve_initial_references("CodecFactory");
codec = codec_factory.create_codec(encoding);
}
catch (Exception e)
{
logger.error("Error initing SASComponentInterceptor: ",e);
}
sasContext = newSasContext();
if (sasContext == null && logger.isErrorEnabled())
{
logger.error("Could not load SAS context class: "+ config.getAttribute("jacorb.security.sas.contextClass", ""));
}
}
代码示例来源:origin: org.jacorb/jacorb-omgapi
public static org.omg.IOP.Encoding read (final org.omg.CORBA.portable.InputStream in)
{
org.omg.IOP.Encoding result = new org.omg.IOP.Encoding();
result.format=in.read_short();
result.major_version=in.read_octet();
result.minor_version=in.read_octet();
return result;
}
public static void write (final org.omg.CORBA.portable.OutputStream out, final org.omg.IOP.Encoding s)
代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj
int localSlot = init_info.allocate_slot_id();
int receivedSlot = init_info.allocate_slot_id();
Encoding cdr_encoding = new Encoding(ENCODING_CDR_ENCAPS.value, (byte)1, (byte)0);
cdr_codec = init_info.codec_factory().create_codec(cdr_encoding);
"ContextORBInitializerImpl", "ENCODING_CDR_ENCAPS", ex);
throw new FatalError(jtsLogger.i18NLogger.get_orbspecific_jacorb_interceptors_context_codeccreate(), ex);
"ContextORBInitializerImpl", "ClientRequestInterceptor", ex);
throw new FatalError(jtsLogger.i18NLogger.get_orbspecific_jacorb_interceptors_context_cie(), ex);
"ContextORBInitializerImpl", "ServerRequestInterceptor", ex);
throw new FatalError(jtsLogger.i18NLogger.get_orbspecific_jacorb_interceptors_context_sie(), ex);
代码示例来源:origin: wildfly/wildfly
@Override
public void post_init(ORBInitInfo info) {
try {
// use CDR encapsulation with GIOP 1.0 encoding.
Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
(byte) 1, /* GIOP version */
(byte) 0 /* GIOP revision*/);
Codec codec = info.codec_factory().create_codec(encoding);
// add IOR interceptor for CSIv2.
info.add_ior_interceptor(new CSIv2IORInterceptor(codec));
// register CSIv2-related policy factories.
info.register_policy_factory(CSIv2Policy.TYPE, new CSIv2PolicyFactory(codec));
} catch (Exception e) {
throw IIOPLogger.ROOT_LOGGER.unexpectedException(e);
}
}
}
代码示例来源:origin: org.apache.yoko/yoko-spec-corba
public static Encoding
read(org.omg.CORBA.portable.InputStream in)
{
Encoding _ob_v = new Encoding();
_ob_v.format = EncodingFormatHelper.read(in);
_ob_v.major_version = in.read_octet();
_ob_v.minor_version = in.read_octet();
return _ob_v;
}
代码示例来源:origin: wildfly/wildfly
@Override
public void post_init(ORBInitInfo info) {
try {
org.omg.CORBA.Object obj;
// Use CDR encapsulations with GIOP 1.0 encoding.
Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
(byte) 1, /* GIOP version */
(byte) 0 /* GIOP revision*/);
Codec codec = info.codec_factory().create_codec(encoding);
// Create and register client interceptor.
obj = info.resolve_initial_references("SASCurrent");
SASCurrentImpl sasCurrentImpl = (SASCurrentImpl) obj;
SASClientInterceptor clientInterceptor = new SASClientInterceptor(codec);
info.add_client_request_interceptor(clientInterceptor);
// Create and register server interceptor.
SASTargetInterceptor serverInterceptor = new SASTargetInterceptor(codec);
info.add_server_request_interceptor(serverInterceptor);
// Initialize the SASCurrent implementation.
sasCurrentImpl.init(serverInterceptor);
} catch (Exception e) {
throw IIOPLogger.ROOT_LOGGER.unexpectedException(e);
}
}
}
代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj
int localSlot = init_info.allocate_slot_id();
int receivedSlot = init_info.allocate_slot_id();
Encoding cdr_encoding = new Encoding(ENCODING_CDR_ENCAPS.value, (byte)1, (byte)2);
cdr_codec = init_info.codec_factory().create_codec(cdr_encoding);
"InterpositionORBInitializerImpl", "ENCODING_CDR_ENCAPS", ex);
throw new FatalError(jtsLogger.i18NLogger.get_orbspecific_javaidl_interceptors_interposition_codeccreate(), ex);
"InterpositionORBInitializerImpl", "ClientRequestInterceptor", ex);
throw new FatalError(jtsLogger.i18NLogger.get_orbspecific_javaidl_interceptors_interposition_cie(), ex);
"InterpositionORBInitializerImpl", "ServerRequestInterceptor", ex);
throw new FatalError(jtsLogger.i18NLogger.get_orbspecific_javaidl_interceptors_interposition_sie(), ex);
代码示例来源:origin: org.apache.yoko/yoko-rmi-impl
public void pre_init(ORBInitInfo info) {
Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value, (byte)1,(byte) 0);
CodecFactory codecFactory = info.codec_factory();
try {
Codec codec = codecFactory.create_codec(encoding);
RMIInterceptor rmiInterceptor = new RMIInterceptor(codec);
info.add_ior_interceptor(rmiInterceptor);
} catch (UserException e) {
logger.log(Level.FINER, "cannot register RMI Interceptor" + e.getMessage(), e);
}
}
代码示例来源:origin: org.jboss.openjdk-orb/openjdk-orb
public static org.omg.IOP.Encoding read (org.omg.CORBA.portable.InputStream istream)
{
org.omg.IOP.Encoding value = new org.omg.IOP.Encoding ();
value.format = istream.read_short ();
value.major_version = istream.read_octet ();
value.minor_version = istream.read_octet ();
return value;
}
代码示例来源:origin: wildfly/wildfly
@Override
public void post_init(ORBInitInfo info) {
try {
org.omg.CORBA.Object obj;
// Use CDR encapsulations with GIOP 1.0 encoding.
Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
(byte) 1, /* GIOP version */
(byte) 0 /* GIOP revision*/);
Codec codec = info.codec_factory().create_codec(encoding);
// Create and register client interceptor.
obj = info.resolve_initial_references("SASCurrent");
SASCurrentImpl sasCurrentImpl = (SASCurrentImpl) obj;
ElytronSASClientInterceptor clientInterceptor = new ElytronSASClientInterceptor(codec);
info.add_client_request_interceptor(clientInterceptor);
// Create and register server interceptor.
SASTargetInterceptor serverInterceptor = new SASTargetInterceptor(codec);
info.add_server_request_interceptor(serverInterceptor);
// Initialize the SASCurrent implementation.
sasCurrentImpl.init(serverInterceptor);
} catch (Exception e) {
throw IIOPLogger.ROOT_LOGGER.unexpectedException(e);
}
}
}
代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj
int localSlot = init_info.allocate_slot_id();
int receivedSlot = init_info.allocate_slot_id();
Encoding cdr_encoding = new Encoding(ENCODING_CDR_ENCAPS.value, (byte)1, (byte)0);
cdr_codec = init_info.codec_factory().create_codec(cdr_encoding);
"InterpositionORBInitializerImpl", "ENCODING_CDR_ENCAPS", ex);
throw new FatalError(jtsLogger.i18NLogger.get_orbspecific_jacorb_interceptors_interposition_codeccreate(), ex);
"InterpositionORBInitializerImpl", "ClientRequestInterceptor", ex);
throw new FatalError(jtsLogger.i18NLogger.get_orbspecific_jacorb_interceptors_interposition_cie(), ex);
"InterpositionORBInitializerImpl", "ServerRequestInterceptor", ex);
throw new FatalError(jtsLogger.i18NLogger.get_orbspecific_jacorb_interceptors_interposition_sie(), ex);
代码示例来源:origin: org.jboss.eap/wildfly-iiop-openjdk
public void post_init(ORBInitInfo info) {
try {
// Use CDR encapsulation with GIOP 1.0 encoding
Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
(byte) 1, /* GIOP version */
(byte) 0 /* GIOP revision*/);
Codec codec = info.codec_factory().create_codec(encoding);
info.add_ior_interceptor(new TxIORInterceptor(codec));
} catch (Exception e) {
throw IIOPLogger.ROOT_LOGGER.unexpectedException(e);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!