本文整理汇总了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;
}
示例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;
}
示例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;
}