private Object unmarshalIdentifier() throws IOException, ClassNotFoundException { final Object id; try { final byte[] idData = poaCurrent.get_object_id(); final Unmarshaller unmarshaller = factory.createUnmarshaller(configuration); unmarshaller.start(new InputStreamByteInput(new ByteArrayInputStream(idData))); id = unmarshaller.readObject(); unmarshaller.finish(); } catch (NoContext noContext) { throw new RuntimeException(noContext); } return id; }
byte[] objectId = poa_current.get_object_id(); String poaName = poa_current.get_POA().the_name();
public org.omg.PortableServer.POA poa(org.omg.PortableServer.Servant self) { org.omg.PortableServer.Current current = org.omg.PortableServer.CurrentHelper .narrow(resolve("POACurrent")); try { return current.get_POA(); } catch (org.omg.PortableServer.CurrentPackage.NoContext ex) { throw new org.omg.CORBA.OBJ_ADAPTER("No current context"); } }
final public POA poa(org.omg.PortableServer.Servant self) { check(); _getPOACurrent(); try { // CORBA 2.4 added the get_servant() operation to the // PortableServer::Current interface. As of JDK 1.4.2, // however, the class org.omg.PortableServant.Current // in Sun's JDK does not have the method get_servant(). // Instead of simply saying _current.get_servant(), below // we say ((org.jacorb.poa.Current)_current).get_servant(). // The cast allows JacORB to run with the obsolete Sun class. if( ((org.jacorb.poa.Current)_current).get_servant() != self ) { throw new org.omg.CORBA.OBJ_ADAPTER(); } return _current.get_POA(); } catch(NoContext e) { throw new org.omg.CORBA.OBJ_ADAPTER(e.toString()); } }
public String getId(Map<String, Object> contextMap) { String id = null; try { Current currentPoa = (Current) orb .resolve_initial_references("POACurrent"); byte[] idBytes = currentPoa.get_object_id(); id = new String(idBytes); //NOPMD } catch (Exception e) { throw new CorbaBindingException("Unable to getId, current is unavailable, reason: " + e, e); } return id; }
private Object unmarshalIdentifier() throws IOException, ClassNotFoundException { final Object id; try { final byte[] idData = poaCurrent.get_object_id(); final Unmarshaller unmarshaller = factory.createUnmarshaller(configuration); unmarshaller.start(new InputStreamByteInput(new ByteArrayInputStream(idData))); id = unmarshaller.readObject(); unmarshaller.finish(); } catch (NoContext noContext) { throw new RuntimeException(noContext); } return id; }
public byte[] object_id(org.omg.PortableServer.Servant self) { org.omg.PortableServer.Current current = org.omg.PortableServer.CurrentHelper .narrow(resolve("POACurrent")); try { return current.get_object_id(); } catch (org.omg.PortableServer.CurrentPackage.NoContext ex) { throw new org.omg.CORBA.OBJ_ADAPTER("No current context"); } }
final public byte[] object_id(org.omg.PortableServer.Servant self) { check(); _getPOACurrent(); try { return _current.get_object_id(); } catch(NoContext e) { throw new org.omg.CORBA.OBJ_ADAPTER(e.toString()); } }
byte[] objectId = poa_current.get_object_id();
byte[] objectId = poa_current.get_object_id();