Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.hivemind.internal.ser
Class ServiceToken  view ServiceToken download ServiceToken.java

java.lang.Object
  extended byorg.apache.hivemind.internal.ser.ServiceToken
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class ServiceToken
extends java.lang.Object
implements java.io.Externalizable

Instance used to replace actual service (proxies) during serialization. Note that this represents a back-door into HiveMind's org.apache.hivemind.internal.RegistryInfrastructure, which is less than ideal, and should not be used by end-user code!

Since:
1.1

Field Summary
private  java.lang.String _serviceId
           
private static long serialVersionUID
           
 
Constructor Summary
ServiceToken()
           
ServiceToken(java.lang.String serviceId)
           
 
Method Summary
 java.lang.String getServiceId()
           
 void readExternal(java.io.ObjectInput in)
          This method restores an object's state by reading in the instance data for the object from the passed in stream.
(package private)  java.lang.Object readResolve()
           
 void writeExternal(java.io.ObjectOutput out)
          This method is responsible for writing the instance data of an object to the passed in stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

_serviceId

private java.lang.String _serviceId
Constructor Detail

ServiceToken

public ServiceToken()

ServiceToken

public ServiceToken(java.lang.String serviceId)
Method Detail

getServiceId

public java.lang.String getServiceId()

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Description copied from interface: java.io.Externalizable
This method is responsible for writing the instance data of an object to the passed in stream. Note that this stream is not a subclass of OutputStream, but rather is a class that implements the ObjectOutput interface. That interface provides a number of methods for writing Java data values to a stream.

Not that the implementation of this method must be coordinated with the implementation of readExternal.

Specified by:
writeExternal in interface java.io.Externalizable

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Description copied from interface: java.io.Externalizable
This method restores an object's state by reading in the instance data for the object from the passed in stream. Note that this stream is not a subclass of InputStream, but rather is a class that implements the ObjectInput interface. That interface provides a mechanism for reading in Java data types from a stream.

Note that this method must be compatible with writeExternal. It must read back the exact same types that were written by that method in the exact order they were written.

If this method needs to read back an object instance, then the class for that object must be found and loaded. If that operation fails, then this method throws a ClassNotFoundException

Specified by:
readExternal in interface java.io.Externalizable

readResolve

java.lang.Object readResolve()