ariba.util.core
Class ComponentChecksum

java.lang.Object
  extended by ariba.util.core.ComponentChecksum
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
FileComponentChecksum, SimpleComponentChecksum

public abstract class ComponentChecksum
extends java.lang.Object
implements java.io.Serializable

The abstract class to support checking the that the runtime configuration of components are consistent within a cluster.

See Also:
Serialized Form

Constructor Summary
ComponentChecksum()
           
ComponentChecksum(java.lang.String name)
           
 
Method Summary
 boolean compareChecksum(byte[] otherChecksum)
          compare the current checksum with another one.
abstract  byte[] getChecksum()
          Return the checksum of the component.
 java.lang.String getName()
          Return the name of the component
static java.util.List makeListOfBytes(byte[] b)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComponentChecksum

public ComponentChecksum(java.lang.String name)

ComponentChecksum

public ComponentChecksum()
Method Detail

getName

public java.lang.String getName()
Return the name of the component

Returns:
the name

getChecksum

public abstract byte[] getChecksum()
Return the checksum of the component. The checksum is an aribitrary byte array. It is up the component implementing this class to determine what a sensible checksum consists of.

Returns:
the component's checksum as a byte array

compareChecksum

public boolean compareChecksum(byte[] otherChecksum)
compare the current checksum with another one.

Parameters:
otherChecksum - checksum to compare
Returns:
false if they aren't the same, true if they are

makeListOfBytes

public static java.util.List makeListOfBytes(byte[] b)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
a human readable version of this checksum


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.