下面列出了怎么用org.omg.CORBA.ORBPackage.InvalidName的API类实例代码及写法,或者点击链接到github查看源代码。
public synchronized POA getRootPOA()
{
if (rootPOA == null) {
// See if we are trying to getRootPOA while shutting down the ORB.
if (isShuttingDown) {
throw omgWrapper.noObjectAdaptor( ) ;
}
try {
Object obj = orb.resolve_initial_references(
ORBConstants.ROOT_POA_NAME ) ;
rootPOA = (POAImpl)obj ;
} catch (InvalidName inv) {
throw wrapper.cantResolveRootPoa( inv ) ;
}
}
return rootPOA;
}
/**
* Resolve the stringified reference of one of the initially
* available CORBA services.
* @param identifier The stringified object reference of the
* desired service.
* @return An object reference for the desired service.
* @exception InvalidName The supplied identifier is not associated
* with a known service.
* @exception SystemException One of a fixed set of Corba system exceptions.
*/
public org.omg.CORBA.Object resolve_initial_references(
String identifier) throws InvalidName
{
Resolver res ;
synchronized( this ) {
checkShutdownState();
res = resolver ;
}
synchronized (resolverLock) {
org.omg.CORBA.Object result = res.resolve( identifier ) ;
if (result == null)
throw new InvalidName() ;
else
return result ;
}
}
public synchronized POA getRootPOA()
{
if (rootPOA == null) {
// See if we are trying to getRootPOA while shutting down the ORB.
if (isShuttingDown) {
throw omgWrapper.noObjectAdaptor( ) ;
}
try {
Object obj = orb.resolve_initial_references(
ORBConstants.ROOT_POA_NAME ) ;
rootPOA = (POAImpl)obj ;
} catch (InvalidName inv) {
throw wrapper.cantResolveRootPoa( inv ) ;
}
}
return rootPOA;
}
/**
* Resolve the stringified reference of one of the initially
* available CORBA services.
* @param identifier The stringified object reference of the
* desired service.
* @return An object reference for the desired service.
* @exception InvalidName The supplied identifier is not associated
* with a known service.
* @exception SystemException One of a fixed set of Corba system exceptions.
*/
public org.omg.CORBA.Object resolve_initial_references(
String identifier) throws InvalidName
{
Resolver res ;
synchronized( this ) {
checkShutdownState();
res = resolver ;
}
synchronized (resolverLock) {
org.omg.CORBA.Object result = res.resolve( identifier ) ;
if (result == null)
throw new InvalidName() ;
else
return result ;
}
}
public synchronized POA getRootPOA()
{
if (rootPOA == null) {
// See if we are trying to getRootPOA while shutting down the ORB.
if (isShuttingDown) {
throw omgWrapper.noObjectAdaptor( ) ;
}
try {
Object obj = orb.resolve_initial_references(
ORBConstants.ROOT_POA_NAME ) ;
rootPOA = (POAImpl)obj ;
} catch (InvalidName inv) {
throw wrapper.cantResolveRootPoa( inv ) ;
}
}
return rootPOA;
}
/**
* Resolve the stringified reference of one of the initially
* available CORBA services.
* @param identifier The stringified object reference of the
* desired service.
* @return An object reference for the desired service.
* @exception InvalidName The supplied identifier is not associated
* with a known service.
* @exception SystemException One of a fixed set of Corba system exceptions.
*/
public org.omg.CORBA.Object resolve_initial_references(
String identifier) throws InvalidName
{
Resolver res ;
synchronized( this ) {
checkShutdownState();
res = resolver ;
}
synchronized (resolverLock) {
org.omg.CORBA.Object result = res.resolve( identifier ) ;
if (result == null)
throw new InvalidName() ;
else
return result ;
}
}
/**
* Resolve the stringified reference of one of the initially
* available CORBA services.
* @param identifier The stringified object reference of the
* desired service.
* @return An object reference for the desired service.
* @exception InvalidName The supplied identifier is not associated
* with a known service.
* @exception SystemException One of a fixed set of Corba system exceptions.
*/
public org.omg.CORBA.Object resolve_initial_references(
String identifier) throws InvalidName
{
Resolver res ;
synchronized( this ) {
checkShutdownState();
res = resolver ;
}
synchronized (resolverLock) {
org.omg.CORBA.Object result = res.resolve( identifier ) ;
if (result == null)
throw new InvalidName() ;
else
return result ;
}
}
public synchronized POA getRootPOA()
{
if (rootPOA == null) {
// See if we are trying to getRootPOA while shutting down the ORB.
if (isShuttingDown) {
throw omgWrapper.noObjectAdaptor( ) ;
}
try {
Object obj = orb.resolve_initial_references(
ORBConstants.ROOT_POA_NAME ) ;
rootPOA = (POAImpl)obj ;
} catch (InvalidName inv) {
throw wrapper.cantResolveRootPoa( inv ) ;
}
}
return rootPOA;
}
/**
* Resolve the stringified reference of one of the initially
* available CORBA services.
* @param identifier The stringified object reference of the
* desired service.
* @return An object reference for the desired service.
* @exception InvalidName The supplied identifier is not associated
* with a known service.
* @exception SystemException One of a fixed set of Corba system exceptions.
*/
public org.omg.CORBA.Object resolve_initial_references(
String identifier) throws InvalidName
{
Resolver res ;
synchronized( this ) {
checkShutdownState();
res = resolver ;
}
synchronized (resolverLock) {
org.omg.CORBA.Object result = res.resolve( identifier ) ;
if (result == null)
throw new InvalidName() ;
else
return result ;
}
}
/**
* Resolve the stringified reference of one of the initially
* available CORBA services.
* @param identifier The stringified object reference of the
* desired service.
* @return An object reference for the desired service.
* @exception InvalidName The supplied identifier is not associated
* with a known service.
* @exception SystemException One of a fixed set of Corba system exceptions.
*/
public org.omg.CORBA.Object resolve_initial_references(
String identifier) throws InvalidName
{
Resolver res ;
synchronized( this ) {
checkShutdownState();
res = resolver ;
}
synchronized (resolverLock) {
org.omg.CORBA.Object result = res.resolve( identifier ) ;
if (result == null)
throw new InvalidName() ;
else
return result ;
}
}
public synchronized POA getRootPOA()
{
if (rootPOA == null) {
// See if we are trying to getRootPOA while shutting down the ORB.
if (isShuttingDown) {
throw omgWrapper.noObjectAdaptor( ) ;
}
try {
Object obj = orb.resolve_initial_references(
ORBConstants.ROOT_POA_NAME ) ;
rootPOA = (POAImpl)obj ;
} catch (InvalidName inv) {
throw wrapper.cantResolveRootPoa( inv ) ;
}
}
return rootPOA;
}
/**
* Resolve the stringified reference of one of the initially
* available CORBA services.
* @param identifier The stringified object reference of the
* desired service.
* @return An object reference for the desired service.
* @exception InvalidName The supplied identifier is not associated
* with a known service.
* @exception SystemException One of a fixed set of Corba system exceptions.
*/
public org.omg.CORBA.Object resolve_initial_references(
String identifier) throws InvalidName
{
Resolver res ;
synchronized( this ) {
checkShutdownState();
res = resolver ;
}
synchronized (resolverLock) {
org.omg.CORBA.Object result = res.resolve( identifier ) ;
if (result == null)
throw new InvalidName() ;
else
return result ;
}
}
public synchronized POA getRootPOA()
{
if (rootPOA == null) {
// See if we are trying to getRootPOA while shutting down the ORB.
if (isShuttingDown) {
throw omgWrapper.noObjectAdaptor( ) ;
}
try {
Object obj = orb.resolve_initial_references(
ORBConstants.ROOT_POA_NAME ) ;
rootPOA = (POAImpl)obj ;
} catch (InvalidName inv) {
throw wrapper.cantResolveRootPoa( inv ) ;
}
}
return rootPOA;
}
/**
* Resolve the stringified reference of one of the initially
* available CORBA services.
* @param identifier The stringified object reference of the
* desired service.
* @return An object reference for the desired service.
* @exception InvalidName The supplied identifier is not associated
* with a known service.
* @exception SystemException One of a fixed set of Corba system exceptions.
*/
public org.omg.CORBA.Object resolve_initial_references(
String identifier) throws InvalidName
{
Resolver res ;
synchronized( this ) {
checkShutdownState();
res = resolver ;
}
synchronized (resolverLock) {
org.omg.CORBA.Object result = res.resolve( identifier ) ;
if (result == null)
throw new InvalidName() ;
else
return result ;
}
}
public synchronized POA getRootPOA()
{
if (rootPOA == null) {
// See if we are trying to getRootPOA while shutting down the ORB.
if (isShuttingDown) {
throw omgWrapper.noObjectAdaptor( ) ;
}
try {
Object obj = orb.resolve_initial_references(
ORBConstants.ROOT_POA_NAME ) ;
rootPOA = (POAImpl)obj ;
} catch (InvalidName inv) {
throw wrapper.cantResolveRootPoa( inv ) ;
}
}
return rootPOA;
}
public synchronized POA getRootPOA()
{
if (rootPOA == null) {
// See if we are trying to getRootPOA while shutting down the ORB.
if (isShuttingDown) {
throw omgWrapper.noObjectAdaptor( ) ;
}
try {
Object obj = orb.resolve_initial_references(
ORBConstants.ROOT_POA_NAME ) ;
rootPOA = (POAImpl)obj ;
} catch (InvalidName inv) {
throw wrapper.cantResolveRootPoa( inv ) ;
}
}
return rootPOA;
}
/**
* Resolve the stringified reference of one of the initially
* available CORBA services.
* @param identifier The stringified object reference of the
* desired service.
* @return An object reference for the desired service.
* @exception InvalidName The supplied identifier is not associated
* with a known service.
* @exception SystemException One of a fixed set of Corba system exceptions.
*/
public org.omg.CORBA.Object resolve_initial_references(
String identifier) throws InvalidName
{
Resolver res ;
synchronized( this ) {
checkShutdownState();
res = resolver ;
}
synchronized (resolverLock) {
org.omg.CORBA.Object result = res.resolve( identifier ) ;
if (result == null)
throw new InvalidName() ;
else
return result ;
}
}
public synchronized POA getRootPOA()
{
if (rootPOA == null) {
// See if we are trying to getRootPOA while shutting down the ORB.
if (isShuttingDown) {
throw omgWrapper.noObjectAdaptor( ) ;
}
try {
Object obj = orb.resolve_initial_references(
ORBConstants.ROOT_POA_NAME ) ;
rootPOA = (POAImpl)obj ;
} catch (InvalidName inv) {
throw wrapper.cantResolveRootPoa( inv ) ;
}
}
return rootPOA;
}
/**
* Resolve the stringified reference of one of the initially
* available CORBA services.
* @param identifier The stringified object reference of the
* desired service.
* @return An object reference for the desired service.
* @exception InvalidName The supplied identifier is not associated
* with a known service.
* @exception SystemException One of a fixed set of Corba system exceptions.
*/
public org.omg.CORBA.Object resolve_initial_references(
String identifier) throws InvalidName
{
Resolver res ;
synchronized( this ) {
checkShutdownState();
res = resolver ;
}
synchronized (resolverLock) {
org.omg.CORBA.Object result = res.resolve( identifier ) ;
if (result == null)
throw new InvalidName() ;
else
return result ;
}
}
protected DynAnyFactory factory() {
try {
return (DynAnyFactory)orb.resolve_initial_references(
ORBConstants.DYN_ANY_FACTORY_NAME );
} catch (InvalidName in) {
throw new RuntimeException("Unable to find DynAnyFactory");
}
}
/**
* If this operation is called with an id, <code>"Y"</code>, and an
* object, <code>YY</code>, then a subsequent call to
* <code>ORB.resolve_initial_references( "Y" )</code> will
* return object <code>YY</code>.
*
* @param id The ID by which the initial reference will be known.
* @param obj The initial reference itself.
* @throws InvalidName if this operation is called with an empty string id
* or this operation is called with an id that is already registered,
* including the default names defined by OMG.
* @throws BAD_PARAM if the obj parameter is null.
*/
public void register_initial_reference(
String id, org.omg.CORBA.Object obj ) throws InvalidName
{
CorbaServerRequestDispatcher insnd ;
synchronized (this) {
checkShutdownState();
}
if ((id == null) || (id.length() == 0))
throw new InvalidName() ;
synchronized (this) {
checkShutdownState();
}
synchronized (resolverLock) {
insnd = insNamingDelegate ;
java.lang.Object obj2 = localResolver.resolve( id ) ;
if (obj2 != null)
throw new InvalidName(id + " already registered") ;
localResolver.register( id, ClosureFactory.makeConstant( obj )) ;
}
synchronized (this) {
if (StubAdapter.isStub(obj))
// Make all remote object references available for INS.
requestDispatcherRegistry.registerServerRequestDispatcher(
insnd, id ) ;
}
}
/**
* If this operation is called with an id, <code>"Y"</code>, and an
* object, <code>YY</code>, then a subsequent call to
* <code>ORB.resolve_initial_references( "Y" )</code> will
* return object <code>YY</code>.
*
* @param id The ID by which the initial reference will be known.
* @param obj The initial reference itself.
* @throws InvalidName if this operation is called with an empty string id
* or this operation is called with an id that is already registered,
* including the default names defined by OMG.
* @throws BAD_PARAM if the obj parameter is null.
*/
public void register_initial_reference(
String id, org.omg.CORBA.Object obj ) throws InvalidName
{
CorbaServerRequestDispatcher insnd ;
synchronized (this) {
checkShutdownState();
}
if ((id == null) || (id.length() == 0))
throw new InvalidName() ;
synchronized (this) {
checkShutdownState();
}
synchronized (resolverLock) {
insnd = insNamingDelegate ;
java.lang.Object obj2 = localResolver.resolve( id ) ;
if (obj2 != null)
throw new InvalidName(id + " already registered") ;
localResolver.register( id, ClosureFactory.makeConstant( obj )) ;
}
synchronized (this) {
if (StubAdapter.isStub(obj))
// Make all remote object references available for INS.
requestDispatcherRegistry.registerServerRequestDispatcher(
insnd, id ) ;
}
}
/**
* If this operation is called with an id, <code>"Y"</code>, and an
* object, <code>YY</code>, then a subsequent call to
* <code>ORB.resolve_initial_references( "Y" )</code> will
* return object <code>YY</code>.
*
* @param id The ID by which the initial reference will be known.
* @param obj The initial reference itself.
* @throws InvalidName if this operation is called with an empty string id
* or this operation is called with an id that is already registered,
* including the default names defined by OMG.
* @throws BAD_PARAM if the obj parameter is null.
*/
public void register_initial_reference(
String id, org.omg.CORBA.Object obj ) throws InvalidName
{
CorbaServerRequestDispatcher insnd ;
synchronized (this) {
checkShutdownState();
}
if ((id == null) || (id.length() == 0))
throw new InvalidName() ;
synchronized (this) {
checkShutdownState();
}
synchronized (resolverLock) {
insnd = insNamingDelegate ;
java.lang.Object obj2 = localResolver.resolve( id ) ;
if (obj2 != null)
throw new InvalidName(id + " already registered") ;
localResolver.register( id, ClosureFactory.makeConstant( obj )) ;
}
synchronized (this) {
if (StubAdapter.isStub(obj))
// Make all remote object references available for INS.
requestDispatcherRegistry.registerServerRequestDispatcher(
insnd, id ) ;
}
}
protected DynAnyFactory factory() {
try {
return (DynAnyFactory)orb.resolve_initial_references(
ORBConstants.DYN_ANY_FACTORY_NAME );
} catch (InvalidName in) {
throw new RuntimeException("Unable to find DynAnyFactory");
}
}
/**
* If this operation is called with an id, <code>"Y"</code>, and an
* object, <code>YY</code>, then a subsequent call to
* <code>ORB.resolve_initial_references( "Y" )</code> will
* return object <code>YY</code>.
*
* @param id The ID by which the initial reference will be known.
* @param obj The initial reference itself.
* @throws InvalidName if this operation is called with an empty string id
* or this operation is called with an id that is already registered,
* including the default names defined by OMG.
* @throws BAD_PARAM if the obj parameter is null.
*/
public void register_initial_reference(
String id, org.omg.CORBA.Object obj ) throws InvalidName
{
CorbaServerRequestDispatcher insnd ;
synchronized (this) {
checkShutdownState();
}
if ((id == null) || (id.length() == 0))
throw new InvalidName() ;
synchronized (this) {
checkShutdownState();
}
synchronized (resolverLock) {
insnd = insNamingDelegate ;
java.lang.Object obj2 = localResolver.resolve( id ) ;
if (obj2 != null)
throw new InvalidName(id + " already registered") ;
localResolver.register( id, ClosureFactory.makeConstant( obj )) ;
}
synchronized (this) {
if (StubAdapter.isStub(obj))
// Make all remote object references available for INS.
requestDispatcherRegistry.registerServerRequestDispatcher(
insnd, id ) ;
}
}
protected DynAnyFactory factory() {
try {
return (DynAnyFactory)orb.resolve_initial_references(
ORBConstants.DYN_ANY_FACTORY_NAME );
} catch (InvalidName in) {
throw new RuntimeException("Unable to find DynAnyFactory");
}
}
/**
* If this operation is called with an id, <code>"Y"</code>, and an
* object, <code>YY</code>, then a subsequent call to
* <code>ORB.resolve_initial_references( "Y" )</code> will
* return object <code>YY</code>.
*
* @param id The ID by which the initial reference will be known.
* @param obj The initial reference itself.
* @throws InvalidName if this operation is called with an empty string id
* or this operation is called with an id that is already registered,
* including the default names defined by OMG.
* @throws BAD_PARAM if the obj parameter is null.
*/
public void register_initial_reference(
String id, org.omg.CORBA.Object obj ) throws InvalidName
{
CorbaServerRequestDispatcher insnd ;
synchronized (this) {
checkShutdownState();
}
if ((id == null) || (id.length() == 0))
throw new InvalidName() ;
synchronized (this) {
checkShutdownState();
}
synchronized (resolverLock) {
insnd = insNamingDelegate ;
java.lang.Object obj2 = localResolver.resolve( id ) ;
if (obj2 != null)
throw new InvalidName(id + " already registered") ;
localResolver.register( id, ClosureFactory.makeConstant( obj )) ;
}
synchronized (this) {
if (StubAdapter.isStub(obj))
// Make all remote object references available for INS.
requestDispatcherRegistry.registerServerRequestDispatcher(
insnd, id ) ;
}
}
protected DynAnyFactory factory() {
try {
return (DynAnyFactory)orb.resolve_initial_references(
ORBConstants.DYN_ANY_FACTORY_NAME );
} catch (InvalidName in) {
throw new RuntimeException("Unable to find DynAnyFactory");
}
}
/**
* If this operation is called with an id, <code>"Y"</code>, and an
* object, <code>YY</code>, then a subsequent call to
* <code>ORB.resolve_initial_references( "Y" )</code> will
* return object <code>YY</code>.
*
* @param id The ID by which the initial reference will be known.
* @param obj The initial reference itself.
* @throws InvalidName if this operation is called with an empty string id
* or this operation is called with an id that is already registered,
* including the default names defined by OMG.
* @throws BAD_PARAM if the obj parameter is null.
*/
public void register_initial_reference(
String id, org.omg.CORBA.Object obj ) throws InvalidName
{
CorbaServerRequestDispatcher insnd ;
synchronized (this) {
checkShutdownState();
}
if ((id == null) || (id.length() == 0))
throw new InvalidName() ;
synchronized (this) {
checkShutdownState();
}
synchronized (resolverLock) {
insnd = insNamingDelegate ;
java.lang.Object obj2 = localResolver.resolve( id ) ;
if (obj2 != null)
throw new InvalidName(id + " already registered") ;
localResolver.register( id, ClosureFactory.makeConstant( obj )) ;
}
synchronized (this) {
if (StubAdapter.isStub(obj))
// Make all remote object references available for INS.
requestDispatcherRegistry.registerServerRequestDispatcher(
insnd, id ) ;
}
}
protected DynAnyFactory factory() {
try {
return (DynAnyFactory)orb.resolve_initial_references(
ORBConstants.DYN_ANY_FACTORY_NAME );
} catch (InvalidName in) {
throw new RuntimeException("Unable to find DynAnyFactory");
}
}