/** * Returns an IR object describing the bean's remote interface. */ public org.omg.CORBA.Object _get_interface_def() { if (interfaceDef != null) return interfaceDef; else return super._get_interface_def(); }
/** * returns a reference to the calls target. */ public org.omg.CORBA.Object target() { return servant._this_object(); }
public String[] getInterfaces(java.lang.Object servant, byte[] objectId) { Servant serv = (Servant) servant; return serv._all_interfaces(this, objectId); }
org.omg.PortableServer.POA thePOA = self._default_POA(); org.apache.yoko.orb.OBPortableServer.POA_impl poaImpl = (org.apache.yoko.orb.OBPortableServer.POA_impl) thePOA; Current_impl current = poaImpl._OB_POACurrent(); try { byte[] oid = current.get_object_id(); String[] all = self._all_interfaces(thePOA, oid); obj = poaImpl.create_reference_with_id(oid, all[0]); } catch (org.omg.PortableServer.CurrentPackage.NoContext ex) {
/** * Allows the servant to obtain the object reference for * the target CORBA object it is incarnating for that request. * @return <code>this_object</code> <code>Object</code> reference * associated with the request. */ final public org.omg.CORBA.Object _this_object() { return _get_delegate().this_object(this); }
/** * The servant is sometimes not available on calling * receive_request_service_contexts (e.g. in case of * ServantLocators or ServantActivators). */ public final void setServant(Servant servant) { this.servant = servant; org.jacorb.poa.POA poa = (org.jacorb.poa.POA) servant._poa(); adapter_id = poa.getPOAId(); String[] all_ifs = servant._all_interfaces(poa, servant._object_id()); target_most_derived_interface = all_ifs[0]; POA parent = poa; ArrayList<String> al = new ArrayList<String> (); while (parent != null) { al.add (parent.the_name ()); parent = (POA) parent.the_parent (); } int size = al.size (); adapter_name = new String [size]; // We can't just do toArray as otherwise adapter_name would be in // reverse order. for (int j = 0, i = (size-1); i >= 0; i--, j++) { adapter_name [j] = al.get (i); } }
/** * called by org.jacorb.poa.RequestProcessor */ @Override public void set_delegate( java.lang.Object wrapper ) { if ( ! (wrapper instanceof org.omg.PortableServer.Servant) ) { throw new org.omg.CORBA.BAD_PARAM("Argument must be of type org.omg.PortableServer.Servant"); } try { ((org.omg.PortableServer.Servant)wrapper)._get_delegate(); } catch ( org.omg.CORBA.BAD_INV_ORDER bio ) { // only set the delegate if it has not been set already org.jacorb.orb.ServantDelegate delegate = new org.jacorb.orb.ServantDelegate( this ); ((org.omg.PortableServer.Servant)wrapper)._set_delegate(delegate); } if (((org.omg.PortableServer.Servant)wrapper)._get_delegate().orb((org.omg.PortableServer.Servant)wrapper) != this) { org.jacorb.orb.ServantDelegate delegate = new org.jacorb.orb.ServantDelegate( this ); ((org.omg.PortableServer.Servant)wrapper)._set_delegate(delegate); } }
_out.write_boolean(self._is_a(_input.read_string() )); _out.write_Object(self._get_interface_def() ); _out.write_boolean(self._non_existent() ); _out.write_Object(self._get_component() ); _out.write_string(self._repository_id() );
protected final void setDelegate(Servant servant, byte[] id) { //This new servant delegate no longer needs the id for // its initialization. servant._set_delegate(delegateImpl); }
/** 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 ; }
public ServerManager _this() { return ServerManagerHelper.narrow( super._this_object()); }
public String[] getInterfaces( java.lang.Object servant, byte[] objectId ) { Servant serv = (Servant)servant ; return serv._all_interfaces( this, objectId ) ; }
public org.omg.CORBA.InterfaceDef get_interface( org.omg.PortableServer.Servant self) { org.omg.PortableServer.POA thePOA = self._default_POA(); org.apache.yoko.orb.OBPortableServer.POA_impl poaImpl = (org.apache.yoko.orb.OBPortableServer.POA_impl) thePOA; String[] ids = self._all_interfaces(thePOA, objectId); org.omg.CORBA.Contained contained = repository.lookup_id(ids[0]);
/** * Returns the instance of the ORB * currently associated with the <code>Servant</code> (convenience method). * @return <code>orb</code> the instance of the ORB currently * associated with the <code>Servant</code>. */ final public ORB _orb() { return _get_delegate().orb(this); }
protected final void setDelegate(Servant servant, byte[] id) { // This new servant delegate no longer needs the id for its initialization. servant._set_delegate(delegateImpl); }
/** * 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; }
public DynStruct _this() { return DynStructHelper.narrow( super._this_object()); }
public String[] getInterfaces(java.lang.Object servant, byte[] objectId) { Servant serv = (Servant) servant; return serv._all_interfaces(this, objectId); }
oid = orb.peekInvocationInfo().id(); poa = (POA)orb.peekInvocationInfo().oa(); String repId = self._all_interfaces(poa,oid)[0] ; return poa.create_reference_with_id(oid, repId); } catch (EmptyStackException notInInvocationE) { defaultPOA = (POAImpl)self._default_POA(); } catch (ClassCastException exception){ throw wrapper.defaultPoaNotPoaimpl( exception ) ;
/** @deprecated Deprecated by CORBA 2.4 */ public org.omg.CORBA.InterfaceDef _get_interface() { return _get_delegate().get_interface(this); }