/** Reads external. */ public void readExternal(ObjectInput oi) throws IOException, ClassNotFoundException { for (;;) { String file = (String) oi.readObject(); if (file == null) { break; } for (;;) { String attr = (String) oi.readObject(); if (attr == null) { break; } Object o = oi.readObject(); // backward compatibility if (o instanceof java.rmi.MarshalledObject) { o = ((java.rmi.MarshalledObject) o).get(); o = new NbMarshalledObject(o); } // end of backward compatibility if (o instanceof NbMarshalledObject) { setAttr(file, attr, o); } } } } }
public static Object unmarshal(MarshalledObject obj) throws IOException, ClassNotFoundException { return obj.get(); } }
public Object get() throws ClassNotFoundException, IOException { Object theValue = enableCallByReference ? value : null; if( theValue == null && marshalledValue != null ) theValue = marshalledValue.get(); return theValue; } }
public Object getNamingProxy() throws Exception { return serverStub.get(); } public void setNamingProxy(Object proxy)
/** * Get the value from this DHTTransport Container. */ public V value() throws IOException, ClassNotFoundException { long t = System.currentTimeMillis(); V v = (V) this.value.get(); t = System.currentTimeMillis() - t; synchronized( DHTTransport.class ) { dtime += t; } return v; }
/** * Get the key from this DHTTransport Container. */ public K key() throws IOException, ClassNotFoundException { long t = System.currentTimeMillis(); K k = (K) this.key.get(); t = System.currentTimeMillis() - t; synchronized( DHTTransport.class ) { dtime += t; } return k; }
private void setSemPm(SemPm oldSemPm) { try { SemPm pm = (SemPm) new MarshalledObject(oldSemPm).get(); setSemPm(pm); } catch (IOException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); } }
public SemImWrapper(SemEstimatorWrapper semEstWrapper) { if (semEstWrapper == null) { throw new NullPointerException(); } SemIm oldSemIm = semEstWrapper.getSemEstimator().getEstimatedSem(); try { setSemIm((SemIm) new MarshalledObject(oldSemIm).get()); } catch (Exception e) { throw new RuntimeException("SemIm could not be deep cloned.", e); } }
public void Xtest02_copyHandleByMarshalledObject() { try { final MarshalledObject obj = new MarshalledObject(ejbHomeHandle); final HomeHandle copy = (HomeHandle) obj.get(); assertNotNull("The HomeHandle copy is null", copy); final EJBHome home = copy.getEJBHome(); assertNotNull("The EJBHome is null", home); } catch (final Exception e) { fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } }
public void Xtest02_copyHandleByMarshalledObject() { try { final MarshalledObject obj = new MarshalledObject(ejbHomeHandle); final HomeHandle copy = (HomeHandle) obj.get(); assertNotNull("The HomeHandle copy is null", copy); final EJBHome home = copy.getEJBHome(); assertNotNull("The EJBHome is null", home); } catch (final Exception e) { fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } }
public void Xtest02_copyHandleByMarshalledObject() { try { MarshalledObject obj = new MarshalledObject(ejbHomeHandle); HomeHandle copy = (HomeHandle) obj.get(); assertNotNull("The HomeHandle copy is null", copy); EJBHome home = copy.getEJBHome(); assertNotNull("The EJBHome is null", home); } catch (Exception e) { fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } }
public void Xtest02_copyHandleByMarshalledObject() { try { final MarshalledObject obj = new MarshalledObject(ejbHomeHandle); final HomeHandle copy = (HomeHandle) obj.get(); assertNotNull("The HomeHandle copy is null", copy); final EJBHome home = copy.getEJBHome(); assertNotNull("The EJBHome is null", home); } catch (final Exception e) { fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } }
public void Xtest02_copyHandleByMarshalledObject() { try { MarshalledObject obj = new MarshalledObject(ejbHomeHandle); HomeHandle copy = (HomeHandle) obj.get(); assertNotNull("The HomeHandle copy is null", copy); EJBHome home = copy.getEJBHome(); assertNotNull("The EJBHome is null", home); } catch (Exception e) { fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } }
public void Xtest02_copyHandleByMarshalledObject() { try { MarshalledObject obj = new MarshalledObject(ejbHomeHandle); HomeHandle copy = (HomeHandle) obj.get(); assertNotNull("The HomeHandle copy is null", copy); EJBHome home = copy.getEJBHome(); assertNotNull("The EJBHome is null", home); } catch (Exception e) { fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } }
public void Xtest02_copyHandleByMarshalledObject() { try { final MarshalledObject obj = new MarshalledObject(ejbHandle); final Handle copy = (Handle) obj.get(); final EJBObject object = copy.getEJBObject(); assertNotNull("The EJBObject is null", object); assertTrue("EJBObjects are not identical", object.isIdentical(ejbObject)); } catch (final Exception e) { fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } }
public void Xtest02_copyHandleByMarshalledObject() { try { final MarshalledObject obj = new MarshalledObject(ejbHandle); final Handle copy = (Handle) obj.get(); final EJBObject object = copy.getEJBObject(); assertNotNull("The EJBObject is null", object); assertTrue("EJBObjects are not identical", object.isIdentical(ejbObject)); } catch (final Exception e) { fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } }
public void Xtest02_copyHandleByMarshalledObject() { try { MarshalledObject obj = new MarshalledObject(ejbHandle); Handle copy = (Handle) obj.get(); EJBObject object = copy.getEJBObject(); assertNotNull("The EJBObject is null", object); assertTrue("EJBObjects are not identical", object.isIdentical(ejbObject)); } catch (Exception e) { fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } }
public void Xtest02_copyHandleByMarshalledObject() { try { final MarshalledObject obj = new MarshalledObject(ejbHandle); final Handle copy = (Handle) obj.get(); final EJBObject object = copy.getEJBObject(); assertNotNull("The EJBObject is null", object); assertTrue("EJBObjects are not identical", object.isIdentical(ejbObject)); } catch (final Exception e) { fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } }
public void Xtest02_copyHandleByMarshalledObject() { try { MarshalledObject obj = new MarshalledObject(ejbHandle); Handle copy = (Handle) obj.get(); EJBObject object = copy.getEJBObject(); assertNotNull("The EJBObject is null", object); assertTrue("EJBObjects are not identical", object.isIdentical(ejbObject)); } catch (Exception e) { fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } }
public void Xtest02_copyHandleByMarshalledObject() { try { MarshalledObject obj = new MarshalledObject(ejbHandle); Handle copy = (Handle) obj.get(); EJBObject object = copy.getEJBObject(); assertNotNull("The EJBObject is null", object); assertTrue("EJBObjects are not identical", object.isIdentical(ejbObject)); } catch (Exception e) { fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } }