本文整理汇总了Java中org.omg.PortableServer.POAPackage.WrongPolicy类的典型用法代码示例。如果您正苦于以下问题:Java WrongPolicy类的具体用法?Java WrongPolicy怎么用?Java WrongPolicy使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
WrongPolicy类属于org.omg.PortableServer.POAPackage包,在下文中一共展示了WrongPolicy类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: set_servant_manager
import org.omg.PortableServer.POAPackage.WrongPolicy; //导入依赖的package包/类
/**
* <code>set_servant_manager</code>
* <b>Section 3.3.8.10</b>
*/
public void set_servant_manager(ServantManager servantManager)
throws WrongPolicy
{
try {
lock() ;
if (debug) {
ORBUtility.dprint( this, "Calling set_servant_manager on poa " +
this + " servantManager=" + servantManager ) ;
}
mediator.setServantManager( servantManager ) ;
} finally {
unlock() ;
}
}
示例2: set_servant
import org.omg.PortableServer.POAPackage.WrongPolicy; //导入依赖的package包/类
/**
* <code>set_servant</code>
* <b>Section 3.3.8.13</b>
*/
public void set_servant(Servant defaultServant)
throws WrongPolicy
{
try {
lock() ;
if (debug) {
ORBUtility.dprint( this, "Calling set_servant on poa " +
this + " defaultServant=" + defaultServant ) ;
}
mediator.setDefaultServant( defaultServant ) ;
} finally {
unlock() ;
}
}
示例3: deactivate_object
import org.omg.PortableServer.POAPackage.WrongPolicy; //导入依赖的package包/类
/**
* <code>deactivate_object</code>
* <b>3.3.8.16</b>
*/
public void deactivate_object(byte[] id)
throws ObjectNotActive, WrongPolicy
{
try {
lock() ;
if (debug) {
ORBUtility.dprint( this,
"Calling deactivate_object on poa " + this +
" (id=" + id + ")" ) ;
}
mediator.deactivateObject( id ) ;
} finally {
if (debug) {
ORBUtility.dprint( this,
"Exiting deactivate_object on poa " + this ) ;
}
unlock() ;
}
}
示例4: create_reference
import org.omg.PortableServer.POAPackage.WrongPolicy; //导入依赖的package包/类
/**
* <code>create_reference</code>
* <b>3.3.8.17</b>
*/
public org.omg.CORBA.Object create_reference(String repId)
throws WrongPolicy
{
try {
lock() ;
if (debug) {
ORBUtility.dprint( this, "Calling create_reference(repId=" +
repId + ") on poa " + this ) ;
}
return makeObject( repId, mediator.newSystemId()) ;
} finally {
unlock() ;
}
}
示例5: servant_to_id
import org.omg.PortableServer.POAPackage.WrongPolicy; //导入依赖的package包/类
/**
* <code>servant_to_id</code>
* <b>3.3.8.19</b>
*/
public byte[] servant_to_id(Servant servant)
throws ServantNotActive, WrongPolicy
{
try {
lock() ;
if (debug) {
ORBUtility.dprint( this, "Calling servant_to_id(servant=" +
servant + ") on poa " + this ) ;
}
return mediator.servantToId( servant ) ;
} finally {
unlock() ;
}
}
示例6: servant_to_reference
import org.omg.PortableServer.POAPackage.WrongPolicy; //导入依赖的package包/类
/**
* <code>servant_to_reference</code>
* <b>3.3.8.20</b>
*/
public org.omg.CORBA.Object servant_to_reference(Servant servant)
throws ServantNotActive, WrongPolicy
{
try {
lock() ;
if (debug) {
ORBUtility.dprint( this,
"Calling servant_to_reference(servant=" +
servant + ") on poa " + this ) ;
}
byte[] oid = mediator.servantToId(servant);
String repId = servant._all_interfaces( this, oid )[0] ;
return create_reference_with_id(oid, repId);
} finally {
unlock() ;
}
}
示例7: reference_to_servant
import org.omg.PortableServer.POAPackage.WrongPolicy; //导入依赖的package包/类
/**
* <code>reference_to_servant</code>
* <b>3.3.8.21</b>
*/
public Servant reference_to_servant(org.omg.CORBA.Object reference)
throws ObjectNotActive, WrongPolicy, WrongAdapter
{
try {
lock() ;
if (debug) {
ORBUtility.dprint( this,
"Calling reference_to_servant(reference=" +
reference + ") on poa " + this ) ;
}
if ( state >= STATE_DESTROYING ) {
throw lifecycleWrapper().adapterDestroyed() ;
}
// reference_to_id should throw WrongAdapter
// if the objref was not created by this POA
byte [] id = internalReferenceToId(reference);
return mediator.idToServant( id ) ;
} finally {
unlock() ;
}
}
示例8: id_to_servant
import org.omg.PortableServer.POAPackage.WrongPolicy; //导入依赖的package包/类
/**
* <code>id_to_servant</code>
* <b>3.3.8.23</b>
*/
public Servant id_to_servant(byte[] id)
throws ObjectNotActive, WrongPolicy
{
try {
lock() ;
if (debug) {
ORBUtility.dprint( this, "Calling id_to_servant(id=" +
id + ") on poa " + this ) ;
}
if( state >= STATE_DESTROYING ) {
throw lifecycleWrapper().adapterDestroyed() ;
}
return mediator.idToServant( id ) ;
} finally {
unlock() ;
}
}
示例9: id_to_reference
import org.omg.PortableServer.POAPackage.WrongPolicy; //导入依赖的package包/类
/**
* <code>id_to_reference</code>
* <b>3.3.8.24</b>
*/
public org.omg.CORBA.Object id_to_reference(byte[] id)
throws ObjectNotActive, WrongPolicy
{
try {
lock() ;
if (debug) {
ORBUtility.dprint( this, "Calling id_to_reference(id=" +
id + ") on poa " + this ) ;
}
if( state >= STATE_DESTROYING ) {
throw lifecycleWrapper().adapterDestroyed() ;
}
Servant s = mediator.idToServant( id ) ;
String repId = s._all_interfaces( this, id )[0] ;
return makeObject(repId, id );
} finally {
unlock() ;
}
}
示例10: activateServant
import org.omg.PortableServer.POAPackage.WrongPolicy; //导入依赖的package包/类
/** Use implicit activation to get an object reference for the servant.
*/
public static org.omg.CORBA.Object activateServant( Servant servant )
{
POA poa = servant._default_POA() ;
org.omg.CORBA.Object ref = null ;
try {
ref = poa.servant_to_reference( servant ) ;
} catch (ServantNotActive sna) {
throw wrapper.getDelegateServantNotActive( sna ) ;
} catch (WrongPolicy wp) {
throw wrapper.getDelegateWrongPolicy( wp ) ;
}
// Make sure that the POAManager is activated if no other
// POAManager state management has taken place.
POAManager mgr = poa.the_POAManager() ;
if (mgr instanceof POAManagerImpl) {
POAManagerImpl mgrImpl = (POAManagerImpl)mgr ;
mgrImpl.implicitActivation() ;
}
return ref ;
}
示例11: reference_to_id
import org.omg.PortableServer.POAPackage.WrongPolicy; //导入依赖的package包/类
/**
* <code>reference_to_id</code>
* <b>3.3.8.22</b>
*/
public byte[] reference_to_id(org.omg.CORBA.Object reference)
throws WrongAdapter, WrongPolicy
{
try {
lock() ;
if (debug) {
ORBUtility.dprint( this, "Calling reference_to_id(reference=" +
reference + ") on poa " + this ) ;
}
if( state >= STATE_DESTROYING ) {
throw lifecycleWrapper().adapterDestroyed() ;
}
return internalReferenceToId( reference ) ;
} finally {
unlock() ;
}
}
示例12: get_servant_manager
import org.omg.PortableServer.POAPackage.WrongPolicy; //导入依赖的package包/类
/**
* <code>get_servant_manager</code>
* <b>Section 3.3.8.10</b>
*/
public ServantManager get_servant_manager() throws WrongPolicy
{
try {
lock() ;
return mediator.getServantManager() ;
} finally {
unlock() ;
}
}
示例13: get_servant
import org.omg.PortableServer.POAPackage.WrongPolicy; //导入依赖的package包/类
/**
* <code>get_servant</code>
* <b>Section 3.3.8.12</b>
*/
public Servant get_servant() throws NoServant, WrongPolicy
{
try {
lock() ;
return mediator.getDefaultServant() ;
} finally {
unlock() ;
}
}
示例14: deactivateHelper
import org.omg.PortableServer.POAPackage.WrongPolicy; //导入依赖的package包/类
public void deactivateHelper( ActiveObjectMap.Key key, AOMEntry entry,
Servant servant ) throws ObjectNotActive, WrongPolicy
{
if (activator == null)
throw poa.invocationWrapper().poaNoServantManager() ;
Etherealizer eth = new Etherealizer( this, key, entry, servant, poa.getDebug() ) ;
entry.startEtherealize( eth ) ;
}
示例15: idToServant
import org.omg.PortableServer.POAPackage.WrongPolicy; //导入依赖的package包/类
public Servant idToServant( byte[] id )
throws WrongPolicy, ObjectNotActive
{
ActiveObjectMap.Key key = new ActiveObjectMap.Key( id ) ;
AOMEntry entry = activeObjectMap.get(key);
Servant servant = activeObjectMap.getServant( entry ) ;
if (servant != null)
return servant ;
else
throw new ObjectNotActive() ;
}