本文整理汇总了Java中com.sun.corba.se.spi.ior.IORFactories类的典型用法代码示例。如果您正苦于以下问题:Java IORFactories类的具体用法?Java IORFactories怎么用?Java IORFactories使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IORFactories类属于com.sun.corba.se.spi.ior包,在下文中一共展示了IORFactories类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: internalReferenceToId
import com.sun.corba.se.spi.ior.IORFactories; //导入依赖的package包/类
private byte[] internalReferenceToId(
org.omg.CORBA.Object reference ) throws WrongAdapter
{
IOR ior = ORBUtility.getIOR( reference ) ;
IORTemplateList thisTemplate = ior.getIORTemplates() ;
ObjectReferenceFactory orf = getCurrentFactory() ;
IORTemplateList poaTemplate =
IORFactories.getIORTemplateList( orf ) ;
if (!poaTemplate.isEquivalent( thisTemplate ))
throw new WrongAdapter();
// Extract the ObjectId from the first TaggedProfile in the IOR.
// If ior was created in this POA, the same ID was used for
// every profile through the profile templates in the currentFactory,
// so we will get the same result from any profile.
Iterator iter = ior.iterator() ;
if (!iter.hasNext())
throw iorWrapper().noProfilesInIor() ;
TaggedProfile prof = (TaggedProfile)(iter.next()) ;
ObjectId oid = prof.getObjectId() ;
return oid.getId();
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:POAImpl.java
示例2: write_Object
import com.sun.corba.se.spi.ior.IORFactories; //导入依赖的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;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:CDROutputStream_1_0.java
示例3: BootstrapResolverImpl
import com.sun.corba.se.spi.ior.IORFactories; //导入依赖的package包/类
public BootstrapResolverImpl(ORB orb, String host, int port) {
wrapper = ORBUtilSystemException.get( orb,
CORBALogDomains.ORB_RESOLVER ) ;
// Create a new IOR with the magic of INIT
byte[] initialKey = "INIT".getBytes() ;
ObjectKey okey = orb.getObjectKeyFactory().create(initialKey) ;
IIOPAddress addr = IIOPFactories.makeIIOPAddress( orb, host, port ) ;
IIOPProfileTemplate ptemp = IIOPFactories.makeIIOPProfileTemplate(
orb, GIOPVersion.V1_0, addr);
IORTemplate iortemp = IORFactories.makeIORTemplate( okey.getTemplate() ) ;
iortemp.add( ptemp ) ;
IOR initialIOR = iortemp.makeIOR( (com.sun.corba.se.spi.orb.ORB)orb,
"", okey.getId() ) ;
bootstrapDelegate = ORBUtility.makeClientDelegate( initialIOR ) ;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:BootstrapResolverImpl.java
示例4: initializeTemplate
import com.sun.corba.se.spi.ior.IORFactories; //导入依赖的package包/类
final public void initializeTemplate( ObjectKeyTemplate oktemp,
boolean notifyORB, Policies policies, String codebase,
String objectAdapterManagerId, ObjectAdapterId objectAdapterId)
{
adapterId = oktemp.getAdapterId() ;
iortemp = IORFactories.makeIORTemplate(oktemp) ;
// This calls acceptors which create profiles and may
// add tagged components to those profiles.
orb.getCorbaTransportManager().addToIORTemplate(
iortemp, policies,
codebase, objectAdapterManagerId, objectAdapterId);
adapterTemplate = IORFactories.makeObjectReferenceTemplate( orb,
iortemp ) ;
currentFactory = adapterTemplate ;
if (notifyORB) {
PIHandler pih = orb.getPIHandler() ;
if (pih != null)
// This runs the IORInterceptors.
pih.objectAdapterCreated( this ) ;
}
iortemp.makeImmutable() ;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:ObjectAdapterBase.java
示例5: read
import com.sun.corba.se.spi.ior.IORFactories; //导入依赖的package包/类
public void read(org.omg.CORBA.portable.InputStream istream) {
super.read(istream);
this.service_contexts
= new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);
this.request_id = istream.read_ulong();
this.reply_status = istream.read_long();
isValidReplyStatus(this.reply_status); // raises exception on error
// The code below reads the reply body in some cases
// SYSTEM_EXCEPTION & LOCATION_FORWARD
if (this.reply_status == SYSTEM_EXCEPTION) {
String reposId = istream.read_string();
this.exClassName = ORBUtility.classNameOf(reposId);
this.minorCode = istream.read_long();
int status = istream.read_long();
switch (status) {
case CompletionStatus._COMPLETED_YES:
this.completionStatus = CompletionStatus.COMPLETED_YES;
break;
case CompletionStatus._COMPLETED_NO:
this.completionStatus = CompletionStatus.COMPLETED_NO;
break;
case CompletionStatus._COMPLETED_MAYBE:
this.completionStatus = CompletionStatus.COMPLETED_MAYBE;
break;
default:
throw wrapper.badCompletionStatusInReply(
CompletionStatus.COMPLETED_MAYBE, new Integer(status) );
}
} else if (this.reply_status == USER_EXCEPTION) {
// do nothing. The client stub will read the exception from body.
} else if (this.reply_status == LOCATION_FORWARD) {
CDRInputStream cdr = (CDRInputStream) istream;
this.ior = IORFactories.makeIOR( cdr ) ;
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:40,代码来源:ReplyMessage_1_0.java
示例6: read
import com.sun.corba.se.spi.ior.IORFactories; //导入依赖的package包/类
public void read(org.omg.CORBA.portable.InputStream istream) {
super.read(istream);
this.request_id = istream.read_ulong();
this.locate_status = istream.read_long();
isValidReplyStatus(this.locate_status); // raises exception on error
// The code below reads the reply body if status is OBJECT_FORWARD
if (this.locate_status == OBJECT_FORWARD) {
CDRInputStream cdr = (CDRInputStream) istream;
this.ior = IORFactories.makeIOR( cdr ) ;
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:LocateReplyMessage_1_0.java
示例7: read
import com.sun.corba.se.spi.ior.IORFactories; //导入依赖的package包/类
public void read(org.omg.CORBA.portable.InputStream istream) {
super.read(istream);
this.request_id = istream.read_ulong();
this.reply_status = istream.read_long();
isValidReplyStatus(this.reply_status); // raises exception on error
// The code below reads the reply body if status is OBJECT_FORWARD
if (this.reply_status == OBJECT_FORWARD) {
CDRInputStream cdr = (CDRInputStream) istream;
this.ior = IORFactories.makeIOR( cdr ) ;
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:LocateReplyMessage_1_1.java
示例8: read
import com.sun.corba.se.spi.ior.IORFactories; //导入依赖的package包/类
public void read(org.omg.CORBA.portable.InputStream istream) {
super.read(istream);
this.service_contexts
= new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);
this.request_id = istream.read_ulong();
this.reply_status = istream.read_long();
isValidReplyStatus(this.reply_status); // raises exception on error
// The code below reads the reply body in some cases
// SYSTEM_EXCEPTION & LOCATION_FORWARD
if (this.reply_status == SYSTEM_EXCEPTION) {
String reposId = istream.read_string();
this.exClassName = ORBUtility.classNameOf(reposId);
this.minorCode = istream.read_long();
int status = istream.read_long();
switch (status) {
case CompletionStatus._COMPLETED_YES:
this.completionStatus = CompletionStatus.COMPLETED_YES;
break;
case CompletionStatus._COMPLETED_NO:
this.completionStatus = CompletionStatus.COMPLETED_NO;
break;
case CompletionStatus._COMPLETED_MAYBE:
this.completionStatus = CompletionStatus.COMPLETED_MAYBE;
break;
default:
throw wrapper.badCompletionStatusInReply(
CompletionStatus.COMPLETED_MAYBE, new Integer(status) );
}
} else if (this.reply_status == USER_EXCEPTION) {
// do nothing. The client stub will read the exception from body.
} else if (this.reply_status == LOCATION_FORWARD) {
CDRInputStream cdr = (CDRInputStream) istream;
this.ior = IORFactories.makeIOR(cdr) ;
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:39,代码来源:ReplyMessage_1_1.java
示例9: write_Object
import com.sun.corba.se.spi.ior.IORFactories; //导入依赖的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;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:IDLJavaSerializationOutputStream.java
示例10: initIORFinders
import com.sun.corba.se.spi.ior.IORFactories; //导入依赖的package包/类
private void initIORFinders( ORB orb )
{
IdentifiableFactoryFinder profFinder =
orb.getTaggedProfileFactoryFinder() ;
profFinder.registerFactory( IIOPFactories.makeIIOPProfileFactory() ) ;
IdentifiableFactoryFinder profTempFinder =
orb.getTaggedProfileTemplateFactoryFinder() ;
profTempFinder.registerFactory(
IIOPFactories.makeIIOPProfileTemplateFactory() ) ;
IdentifiableFactoryFinder compFinder =
orb.getTaggedComponentFactoryFinder() ;
compFinder.registerFactory(
IIOPFactories.makeCodeSetsComponentFactory() ) ;
compFinder.registerFactory(
IIOPFactories.makeJavaCodebaseComponentFactory() ) ;
compFinder.registerFactory(
IIOPFactories.makeORBTypeComponentFactory() ) ;
compFinder.registerFactory(
IIOPFactories.makeMaxStreamFormatVersionComponentFactory() ) ;
compFinder.registerFactory(
IIOPFactories.makeAlternateIIOPAddressComponentFactory() ) ;
compFinder.registerFactory(
IIOPFactories.makeRequestPartitioningComponentFactory() ) ;
compFinder.registerFactory(
IIOPFactories.makeJavaSerializationComponentFactory());
// Register the ValueFactory instances for ORT
IORFactories.registerValueFactories( orb ) ;
// Register an ObjectKeyFactory
orb.setObjectKeyFactory( IORFactories.makeObjectKeyFactory(orb) ) ;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:35,代码来源:ORBConfiguratorImpl.java
示例11: object_to_string
import com.sun.corba.se.spi.ior.IORFactories; //导入依赖的package包/类
/**
* Convert an object ref to a string.
* @param obj The object to stringify.
* @return A stringified object reference.
*/
public synchronized String object_to_string(org.omg.CORBA.Object obj)
{
checkShutdownState();
// Handle the null objref case
if (obj == null) {
IOR nullIOR = IORFactories.makeIOR( this ) ;
return nullIOR.stringify();
}
IOR ior = null ;
try {
ior = ORBUtility.connectAndGetIOR( this, obj ) ;
} catch (BAD_PARAM bp) {
// Throw MARSHAL instead if this is a LOCAL_OBJECT_NOT_ALLOWED error.
if (bp.minor == ORBUtilSystemException.LOCAL_OBJECT_NOT_ALLOWED) {
throw omgWrapper.notAnObjectImpl( bp ) ;
} else
// Not a local object problem: just rethrow the exception.
// Do not wrap and log this, since it was already logged at its
// point of origin.
throw bp ;
}
return ior.stringify() ;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:33,代码来源:ORBImpl.java
示例12: _read
import com.sun.corba.se.spi.ior.IORFactories; //导入依赖的package包/类
/** Read the data into a (presumably) empty ORTImpl. This sets the
* orb to the ORB of the InputStream.
*/
public void _read( InputStream is )
{
org.omg.CORBA_2_3.portable.InputStream istr =
(org.omg.CORBA_2_3.portable.InputStream)is ;
iorTemplate = IORFactories.makeIORTemplate( istr ) ;
orb = (ORB)(istr.orb()) ;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:ObjectReferenceTemplateImpl.java
示例13: getIORTemplateList
import com.sun.corba.se.spi.ior.IORFactories; //导入依赖的package包/类
public IORTemplateList getIORTemplateList()
{
IORTemplateList tl = IORFactories.makeIORTemplateList() ;
tl.add( iorTemplate ) ;
tl.makeImmutable() ;
return tl ;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:ObjectReferenceTemplateImpl.java
注:本文中的com.sun.corba.se.spi.ior.IORFactories类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论