Avaya Conferencing Provider API

com.avaya.conferencing.api.acp.control
Class Reference<T extends ConferencingObject>

java.lang.Object
  extended by com.avaya.conferencing.api.acp.control.Reference<T>
Type Parameters:
T - The type of ConferencingObject that this reference refers to.
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public abstract class Reference<T extends ConferencingObject>
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Reference object for a ConferencingObject. Reference objects are designed to be used as handles to their ConferencingObject. Accessing the internal data structures of a Reference is not permitted.

In order to support distributed client application using this API, Reference objects are Serializable. Thus they can be serialized into a distributed cache or Http Session and deserialized in a (possibly different) JVM, however when a Reference has been serialized and deserialized in this manner, it will not be a valid Reference unless the JVM (or more specifically the ClassLoader) in which it has been deserialized also has a valid Connection to the conferencing provider that the Reference refers to. Thus whenever a Reference is deserialized it is necessary to call isValid() or checkValid() before using it again.

Since:
5.1.0.0.29
See Also:
Serialized Form

Constructor Summary
Reference()
           
 
Method Summary
abstract  void checkValid()
          Checks to see if a reference that has been serialized and deserialized is valid.
 Reference<T> clone()
          
abstract  Connection getConnection()
          Returns the connection used by this reference, or null if the reference is no longer valid.
abstract  java.lang.Class<T> getReferencedClass()
          Returns the type of ConferencingObject that this reference refers to.
 T getReferencedObject()
          Returns the object referenced used by this reference.
abstract  boolean isValid()
          Returns true if the reference is valid.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Reference

public Reference()
Method Detail

clone

public Reference<T> clone()

Overrides:
clone in class java.lang.Object
Since:
5.1.0.0.29

checkValid

public abstract void checkValid()
                         throws InvalidReferenceException
Checks to see if a reference that has been serialized and deserialized is valid.

Throws:
InvalidReferenceException - If the reference is no longer valid.
Since:
5.1.0.0.29
See Also:
isValid()

getConnection

public abstract Connection getConnection()
Returns the connection used by this reference, or null if the reference is no longer valid.

Returns:
Value for property 'connection'.
Since:
5.1.0.0.29
See Also:
checkValid(), isValid()

getReferencedClass

public abstract java.lang.Class<T> getReferencedClass()
Returns the type of ConferencingObject that this reference refers to.

Returns:
the type of ConferencingObject that this reference refers to.
Since:
5.1.0.0.29

isValid

public abstract boolean isValid()
Returns true if the reference is valid. A reference can become invalid if it is serialized and subsequently deserialized inside a JVM (or more correctly a ClassLoader) which does not have (or no longer has) a Connection to the Conferencing Provider that this Reference refers to.

Returns:
true if the reference is valid.
Since:
5.1.0.0.29

getReferencedObject

public T getReferencedObject()
                                                 throws InvalidReferenceException
Returns the object referenced used by this reference.

Returns:
The object corresponding to this reference.
Throws:
InvalidReferenceException - If the reference is no longer valid.
Since:
6.0.0.0.1
See Also:
isValid()

Avaya Conferencing Provider API

Copyright © 2008-2009 Avaya. All Rights Reserved.