Top Description Inners Fields Constructors Methods
org.conscrypt

pack-priv abstract Class NativeRef

extends Object
Class Inheritance
Known Direct Subclasses
org.conscrypt.NativeRef.EC_GROUP, org.conscrypt.NativeRef.EC_POINT, org.conscrypt.NativeRef.EVP_CIPHER_CTX, org.conscrypt.NativeRef.EVP_MD_CTX, org.conscrypt.NativeRef.EVP_PKEY, org.conscrypt.NativeRef.EVP_PKEY_CTX, org.conscrypt.NativeRef.HMAC_CTX, org.conscrypt.NativeRef.SSL_SESSION

Used to hold onto native OpenSSL references and run finalization on those objects. Individual types must subclass this and implement finalizer.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final long

Constructor Summary

AccessConstructor and Description
pack-priv
NativeRef(long address)

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract void
doFree(long context)

public boolean
equals(Object
the reference object with which to compare.
o
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
protected void
finalize()

Overrides java.lang.Object.finalize.

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
Inherited from java.lang.Object:
clonegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

addressback to summary
pack-priv final long address

Constructor Detail

NativeRefback to summary
pack-priv NativeRef(long address)

Method Detail

doFreeback to summary
pack-priv abstract void doFree(long context)
equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
o:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
finalizeback to summary
protected void finalize() throws Throwable

Overrides java.lang.Object.finalize.

Doc from java.lang.Object.finalize.

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. A subclass overrides the finalize method to dispose of system resources or to perform other cleanup.

When running in a Java virtual machine in which finalization has been disabled or removed, the garbage collector will never call finalize(). In a Java virtual machine in which finalization is enabled, the garbage collector might call finalize only after an indefinite delay.

The general contract of finalize is that it is invoked if and when the Java virtual machine has determined that there is no longer any means by which this object can be accessed by any thread that has not yet died, except as a result of an action taken by the finalization of some other object or class which is ready to be finalized. The finalize method may take any action, including making this object available again to other threads; the usual purpose of finalize, however, is to perform cleanup actions before the object is irrevocably discarded. For example, the finalize method for an object that represents an input/output connection might perform explicit I/O transactions to break the connection before the object is permanently discarded.

The finalize method of class Object performs no special action; it simply returns normally. Subclasses of Object may override this definition.

The Java programming language does not guarantee which thread will invoke the finalize method for any given object. It is guaranteed, however, that the thread that invokes finalize will not be holding any user-visible synchronization locks when finalize is invoked. If an uncaught exception is thrown by the finalize method, the exception is ignored and finalization of that object terminates.

After the finalize method has been invoked for an object, no further action is taken until the Java virtual machine has again determined that there is no longer any means by which this object can be accessed by any thread that has not yet died, including possible actions by other objects or classes which are ready to be finalized, at which point the object may be discarded.

The finalize method is never invoked more than once by a Java virtual machine for any given object.

Any exception thrown by the finalize method causes the finalization of this object to be halted, but is otherwise ignored.

Annotations
@Override
Exceptions
Throwable:
the Exception raised by this method
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

Annotations
@Override
org.conscrypt back to summary

pack-priv final Class NativeRef.EC_GROUP

extends NativeRef
Class Inheritance

Field Summary

Inherited from org.conscrypt.NativeRef:
address

Constructor Summary

AccessConstructor and Description
pack-priv
EC_GROUP(long ctx)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
doFree(long context)

Implements abstract org.conscrypt.NativeRef.doFree.

Inherited from org.conscrypt.NativeRef:
equalsfinalizehashCode

Constructor Detail

EC_GROUPback to summary
pack-priv EC_GROUP(long ctx)

Method Detail

doFreeback to summary
pack-priv void doFree(long context)

Implements abstract org.conscrypt.NativeRef.doFree.

Annotations
@Override
org.conscrypt back to summary

pack-priv final Class NativeRef.EC_POINT

extends NativeRef
Class Inheritance

Field Summary

Inherited from org.conscrypt.NativeRef:
address

Constructor Summary

AccessConstructor and Description
pack-priv
EC_POINT(long nativePointer)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
doFree(long context)

Implements abstract org.conscrypt.NativeRef.doFree.

Inherited from org.conscrypt.NativeRef:
equalsfinalizehashCode

Constructor Detail

EC_POINTback to summary
pack-priv EC_POINT(long nativePointer)

Method Detail

doFreeback to summary
pack-priv void doFree(long context)

Implements abstract org.conscrypt.NativeRef.doFree.

Annotations
@Override
org.conscrypt back to summary

pack-priv final Class NativeRef.EVP_CIPHER_CTX

extends NativeRef
Class Inheritance

Field Summary

Inherited from org.conscrypt.NativeRef:
address

Constructor Summary

AccessConstructor and Description
pack-priv
EVP_CIPHER_CTX(long nativePointer)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
doFree(long context)

Implements abstract org.conscrypt.NativeRef.doFree.

Inherited from org.conscrypt.NativeRef:
equalsfinalizehashCode

Constructor Detail

EVP_CIPHER_CTXback to summary
pack-priv EVP_CIPHER_CTX(long nativePointer)

Method Detail

doFreeback to summary
pack-priv void doFree(long context)

Implements abstract org.conscrypt.NativeRef.doFree.

Annotations
@Override
org.conscrypt back to summary

pack-priv final Class NativeRef.EVP_MD_CTX

extends NativeRef
Class Inheritance

Field Summary

Inherited from org.conscrypt.NativeRef:
address

Constructor Summary

AccessConstructor and Description
pack-priv
EVP_MD_CTX(long nativePointer)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
doFree(long context)

Implements abstract org.conscrypt.NativeRef.doFree.

Inherited from org.conscrypt.NativeRef:
equalsfinalizehashCode

Constructor Detail

EVP_MD_CTXback to summary
pack-priv EVP_MD_CTX(long nativePointer)

Method Detail

doFreeback to summary
pack-priv void doFree(long context)

Implements abstract org.conscrypt.NativeRef.doFree.

Annotations
@Override
org.conscrypt back to summary

pack-priv final Class NativeRef.EVP_PKEY

extends NativeRef
Class Inheritance

Field Summary

Inherited from org.conscrypt.NativeRef:
address

Constructor Summary

AccessConstructor and Description
pack-priv
EVP_PKEY(long nativePointer)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
doFree(long context)

Implements abstract org.conscrypt.NativeRef.doFree.

Inherited from org.conscrypt.NativeRef:
equalsfinalizehashCode

Constructor Detail

EVP_PKEYback to summary
pack-priv EVP_PKEY(long nativePointer)

Method Detail

doFreeback to summary
pack-priv void doFree(long context)

Implements abstract org.conscrypt.NativeRef.doFree.

Annotations
@Override
org.conscrypt back to summary

pack-priv final Class NativeRef.EVP_PKEY_CTX

extends NativeRef
Class Inheritance

Field Summary

Inherited from org.conscrypt.NativeRef:
address

Constructor Summary

AccessConstructor and Description
pack-priv
EVP_PKEY_CTX(long nativePointer)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
doFree(long context)

Implements abstract org.conscrypt.NativeRef.doFree.

Inherited from org.conscrypt.NativeRef:
equalsfinalizehashCode

Constructor Detail

EVP_PKEY_CTXback to summary
pack-priv EVP_PKEY_CTX(long nativePointer)

Method Detail

doFreeback to summary
pack-priv void doFree(long context)

Implements abstract org.conscrypt.NativeRef.doFree.

Annotations
@Override
org.conscrypt back to summary

pack-priv final Class NativeRef.HMAC_CTX

extends NativeRef
Class Inheritance

Field Summary

Inherited from org.conscrypt.NativeRef:
address

Constructor Summary

AccessConstructor and Description
pack-priv
HMAC_CTX(long nativePointer)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
doFree(long context)

Implements abstract org.conscrypt.NativeRef.doFree.

Inherited from org.conscrypt.NativeRef:
equalsfinalizehashCode

Constructor Detail

HMAC_CTXback to summary
pack-priv HMAC_CTX(long nativePointer)

Method Detail

doFreeback to summary
pack-priv void doFree(long context)

Implements abstract org.conscrypt.NativeRef.doFree.

Annotations
@Override
org.conscrypt back to summary

pack-priv final Class NativeRef.SSL_SESSION

extends NativeRef
Class Inheritance

Field Summary

Inherited from org.conscrypt.NativeRef:
address

Constructor Summary

AccessConstructor and Description
pack-priv
SSL_SESSION(long nativePointer)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
doFree(long context)

Implements abstract org.conscrypt.NativeRef.doFree.

Inherited from org.conscrypt.NativeRef:
equalsfinalizehashCode

Constructor Detail

SSL_SESSIONback to summary
pack-priv SSL_SESSION(long nativePointer)

Method Detail

doFreeback to summary
pack-priv void doFree(long context)

Implements abstract org.conscrypt.NativeRef.doFree.

Annotations
@Override