Package net.jini.io

Examples of net.jini.io.MarshalledInstance


      if (fieldValue == null) {
    vals[nvals] = null;
      } else {
    try {
        vals[nvals] = new MarshalledInstance(fieldValue);
    } catch (IOException e) {
        throw throwNewMarshalException(
            "Can't marshal field " + field + " with value " +
      fieldValue, e);
    }
View Full Code Here


    Throwable nested = null;
    try {
        if (!usableField(fields[i]))
      continue;
       
        final MarshalledInstance val = values[nvals++];
        Object value = (val == null ? null : val.get(integrity));
        fields[i].set(entryObj, value);
    } catch (Throwable e) {
        nested = e;
    }
View Full Code Here

    private static void marshalAttributes(Entry[] attrs,
            ObjectOutputStream out)
  throws IOException
    {
  for (int i=0; i < attrs.length; i++) {
      out.writeObject(new MarshalledInstance(attrs[i]));
  }
  out.writeObject(null);
    }
View Full Code Here

     */
    private static Entry[] unmarshalAttributes(ObjectInputStream in)
  throws IOException, ClassNotFoundException
    {
  ArrayList attributes = new ArrayList();
  MarshalledInstance mi = null;
  while ((mi = (MarshalledInstance) in.readObject()) != null) {
      try {
    attributes.add((Entry) mi.get(false));
      } catch (Throwable e) {
    if (e instanceof Error &&
        ThrowableConstants.retryable(e) ==
      ThrowableConstants.BAD_OBJECT)
    {
View Full Code Here

    private static void marshalLocators(LookupLocator[] locators,
          ObjectOutputStream out)
  throws IOException
    {
  for (int i = 0; i < locators.length; i++) {
      out.writeObject(new MarshalledInstance(locators[i]));
  }
  out.writeObject(null);
    }
View Full Code Here

     */
    private static LookupLocator[] unmarshalLocators(ObjectInputStream in)
  throws IOException, ClassNotFoundException
    {
  List l = new ArrayList();
  MarshalledInstance mi;
  while ((mi = (MarshalledInstance) in.readObject()) != null) {
      try {
    l.add((LookupLocator) mi.get(false));
      } catch (Throwable e) {
    if (e instanceof Error &&
        ThrowableConstants.retryable(e) ==
      ThrowableConstants.BAD_OBJECT)
    {
View Full Code Here

   */
  private void writeObject(ObjectOutputStream stream)
      throws IOException
  {
      stream.defaultWriteObject();
      stream.writeObject(new MarshalledInstance(listener));
  }
View Full Code Here

   */
  private void readObject(ObjectInputStream stream)
      throws IOException, ClassNotFoundException
  {
      stream.defaultReadObject();
      MarshalledInstance mi = (MarshalledInstance) stream.readObject();
      try {
    listener = (RemoteEventListener) mi.get(false);
      } catch (Throwable e) {
    if (e instanceof Error &&
        ThrowableConstants.retryable(e) ==
      ThrowableConstants.BAD_OBJECT)
    {
View Full Code Here

  synchronized void activeObject(UID uid, MarshalledObject mobj)
      throws UnknownObjectException
  {
      getObjectEntry(uid).stub =
    new MarshalledWrapper(new MarshalledInstance(mobj));
  }
View Full Code Here

      if (removed) {
    throw new UnknownObjectException("object removed");
      } else if (!force && nstub != null) {
    return nstub;
      }
      MarshalledInstance marshalledProxy =
    new MarshalledInstance(inst.newInstance(getAID(uid), desc));
      nstub = new MarshalledWrapper(marshalledProxy);
      stub = nstub;
      return nstub;
  }
View Full Code Here

TOP

Related Classes of net.jini.io.MarshalledInstance

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.