com.sun.jmx.remote.generic
Class ObjectWrappingImpl

java.lang.Object
  extended by com.sun.jmx.remote.generic.ObjectWrappingImpl
All Implemented Interfaces:
ObjectWrapping

public class ObjectWrappingImpl
extends Object
implements ObjectWrapping

This class is the default implementation of the interface ObjectWrapping. Objects are wrapped in a byte array containing the output of ObjectOutputStream.writeObject(Object).


Constructor Summary
ObjectWrappingImpl()
           
 
Method Summary
 Object unwrap(Object wrapped, ClassLoader cloader)
          Unwraps an object.
 Object wrap(Object obj)
          Wraps an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectWrappingImpl

public ObjectWrappingImpl()
Method Detail

wrap

public Object wrap(Object obj)
            throws IOException
Description copied from interface: ObjectWrapping
Wraps an object.

Specified by:
wrap in interface ObjectWrapping
Parameters:
obj - the object to be wrapped.
Returns:
the wrapped object.
Throws:
IOException - if the object cannot be wrapped for some reason.

unwrap

public Object unwrap(Object wrapped,
                     ClassLoader cloader)
              throws IOException,
                     ClassNotFoundException
Description copied from interface: ObjectWrapping
Unwraps an object.

Specified by:
unwrap in interface ObjectWrapping
Parameters:
wrapped - the wrapped object to be unwrapped.
cloader - the class loader to be used to load the object's class. Can be null, meaning the bootstrap class loader.
Returns:
the unwrapped object.
Throws:
IOException - if the object cannot be unwrapped for some reason.
ClassNotFoundException - if the class that the unwrapped object should have is not known to the given class loader.


Copyright © 2014 Terracotta, Inc.. All rights reserved.