当前位置: 首页>>代码示例>>Java>>正文


Java RemoteClass类代码示例

本文整理汇总了Java中org.red5.annotations.RemoteClass的典型用法代码示例。如果您正苦于以下问题:Java RemoteClass类的具体用法?Java RemoteClass怎么用?Java RemoteClass使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RemoteClass类属于org.red5.annotations包,在下文中一共展示了RemoteClass类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getClassName

import org.red5.annotations.RemoteClass; //导入依赖的package包/类
/**
 * Handles classes by name, also provides "shortened" class aliases where appropriate.
 * 
 * @param objectClass class
 * @return class name for given object
 */
public static String getClassName(Class<?> objectClass) {
	RemoteClass annotation = objectClass.getAnnotation(RemoteClass.class);
	if (annotation != null) {
		return annotation.alias();
	}
	String className = objectClass.getName();
	if (className.startsWith("org.red5.compatibility.")) {
		// Strip compatibility prefix from classname
		className = className.substring(23);
		if ("flex.messaging.messages.AsyncMessageExt".equals(className)) {
			className = "DSA";
		} else if ("flex.messaging.messages.CommandMessageExt".equals(className)) {
			className = "DSC";
		} else if ("flex.messaging.messages.AcknowledgeMessageExt".equals(className)) {
			className = "DSK";
		}
	}
	log.debug("Classname: {}", className);
	return className;
}
 
开发者ID:Kyunghwa-Yoo,项目名称:StitchRTSP,代码行数:27,代码来源:Serializer.java

示例2: getClassName

import org.red5.annotations.RemoteClass; //导入依赖的package包/类
/**
 * Handles classes by name, also provides "shortened" class aliases where appropriate.
 * 
 * @param objectClass
 *            class
 * @return class name for given object
 */
public static String getClassName(Class<?> objectClass) {
    RemoteClass annotation = objectClass.getAnnotation(RemoteClass.class);
    if (annotation != null) {
        return annotation.alias();
    }
    String className = objectClass.getName();
    if (className.startsWith("org.red5.compatibility.")) {
        // Strip compatibility prefix from classname
        className = className.substring(23);
        if ("flex.messaging.messages.AsyncMessageExt".equals(className)) {
            className = "DSA";
        } else if ("flex.messaging.messages.CommandMessageExt".equals(className)) {
            className = "DSC";
        } else if ("flex.messaging.messages.AcknowledgeMessageExt".equals(className)) {
            className = "DSK";
        }
    }
    log.debug("Classname: {}", className);
    return className;
}
 
开发者ID:Red5,项目名称:red5-io,代码行数:28,代码来源:Serializer.java

示例3: getClassName

import org.red5.annotations.RemoteClass; //导入依赖的package包/类
/**
 * Handles classes by name, also provides "shortened" class aliases where appropriate.
 * 
 * @param objectClass
 * @return class name for given object
 */
public String getClassName(Class<?> objectClass) {
	RemoteClass annotation = objectClass.getAnnotation(RemoteClass.class);
	if (annotation != null) {
		return annotation.alias();
	}
	String className = objectClass.getName();
	if (className.startsWith("org.red5.compatibility.")) {
		// Strip compatibility prefix from classname
		className = className.substring(23);
		if ("flex.messaging.messages.AsyncMessageExt".equals(className)) {
			className = "DSA";
		} else if ("flex.messaging.messages.CommandMessageExt".equals(className)) {
			className = "DSC";
		} else if ("flex.messaging.messages.AcknowledgeMessageExt".equals(className)) {
			className = "DSK";
		}
	}
	log.debug("Classname: {}", className);
	return className;
}
 
开发者ID:cwpenhale,项目名称:red5-mobileconsole,代码行数:27,代码来源:Serializer.java


注:本文中的org.red5.annotations.RemoteClass类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。