flex.messaging.io
Class ClassAliasRegistry

java.lang.Object
  extended by flex.messaging.io.ClassAliasRegistry

public class ClassAliasRegistry
extends Object

A simple registry that maps an alias to a concrete class name. This registry mimics the ActionScript 3 flash.net.registerClassAlias() functionality of the Flash Player. The registry is checked when deserializing AMF object types.


Method Summary
 void clear()
          Clears all items from the registry.
 String getClassName(String alias)
          Looks for a concrete class name for an alias.
static ClassAliasRegistry getRegistry()
          Returns the registry singleton.
 void registerAlias(String alias, String className)
          Registers a custom alias for a class name.
 void unregisterAlias(String alias)
          Removes a class alias from the registry.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRegistry

public static ClassAliasRegistry getRegistry()
Returns the registry singleton.


getClassName

public String getClassName(String alias)
Looks for a concrete class name for an alias.

Parameters:
alias - The alias used to search the registry.
Returns:
a concrete class name, if registered for this alias, otherwise null.

clear

public void clear()
Clears all items from the registry.


registerAlias

public void registerAlias(String alias,
                          String className)
Registers a custom alias for a class name.

Parameters:
alias - The alias for the class name.
className - The concrete class name.

unregisterAlias

public void unregisterAlias(String alias)
Removes a class alias from the registry.

Parameters:
alias - The alias to be removed from the registry.


Copyright © 2008 Adobe Systems Inc. All Rights Reserved.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/blazeds/1/javadoc/flex/messaging/io/ClassAliasRegistry.html