Package net.jini.io

Examples of net.jini.io.MarshalledInstance


         *  is returned.
         */
  private boolean sameVersion(ServiceItem item0,ServiceItem item1) {
            boolean fullyEqual = false;
            try {
                MarshalledInstance mi0 = new MarshalledInstance(item0.service);
                MarshalledInstance mi1 = new MarshalledInstance(item1.service);
                fullyEqual = mi0.fullyEquals(mi1);
            } catch(IOException e) {
                logger.log(Level.INFO, "failure marshalling old and new "
                           +"services for equality check", e);
            }
View Full Code Here


      int port = socket.getPort();

      // read LUS proxy
      ObjectInputStream oin = new ObjectInputStream(
    new BufferedInputStream(socket.getInputStream()));
      MarshalledInstance mi =
    new MarshalledInstance((MarshalledObject) oin.readObject());
      ServiceRegistrar reg =
    (ServiceRegistrar) mi.get(defaultLoader, false, null, context);

      // read LUS member groups
      int ngroups = oin.readInt();
      if (ngroups < 0) {
    throw new DiscoveryProtocolException(
View Full Code Here

  // write LUS proxy
  ObjectOutputStream oout = new ObjectOutputStream(
      new BufferedOutputStream(socket.getOutputStream()));
  oout.writeObject(
      new MarshalledInstance(
    response.getRegistrar(), context).convertToMarshalledObject());

  // write LUS member groups
  String[] groups = response.getGroups();
  oout.writeInt(groups.length);
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

         *  is returned.
         */
  private boolean sameVersion(ServiceItem item0,ServiceItem item1) {
            boolean fullyEqual = false;
            try {
                MarshalledInstance mi0 = new MarshalledInstance(item0.service);
                MarshalledInstance mi1 = new MarshalledInstance(item1.service);
                fullyEqual = mi0.fullyEquals(mi1);
            } catch(IOException e) {
                logger.log(Level.INFO, "failure marshalling old and new "
                           +"services for equality check", e);
            }
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.