Dynamic Proxy Classes
本文翻译自 Java SE 6 Technotes -《Dynamic Proxy Classes》, 少部分内容取自 Java SE API 中文版.
Table Of Contents
Introduction
Dynamic Proxy API
Serialization
Examples
Introduction
一个动态代理类(dynamic proxy class)是实现了一组在运行期指定的接口的类, 通过已实现接口中的某个接口而对代理类某实例的方法调用将被编码并分派给另一个具有同一接口的对象上(a method invocation through one of the interfaces on an instance of the class will be encoded and dispatched to another object through a uniform interface). 因此, 一个动态代理类可用于为一组接口创建类型安全的代理对象而不需预先(例如使用编译期工具)生成这些代理类. 对一个动态代理类的某个实例进行方法调用会被分派给该实例调用处理器(invocation handler)中的某一方法, 且这些调用会以一个 java.lang.reflect.Method 对象(标识要调用的这些方法)和一个类型为 Object [...]
Categorized in: Design Patterns, Java · Tagged with: AOP, Java
Spring notes(四) – AOP
AOP in springframework…
Categorized in: Java · Tagged with: AOP, Java, Spring
Spring notes(三) - Resource
Resource interface defines the accessor to all various resources, such as file, http resource, ftp resource, class, etc.
Built-in implementations:
UrlResource
ClassPathResource
FileSystemResource
ServletContextResource
InputStreamResource
ByteArrayResource
Categorized in: Java · Tagged with: AOP, Java, Spring
Spring notes(二) – Ioc container
IOC container, in spring framework is BeanFactory, contains the following functions:
controls the lifecycle (creation, init, destroy)
controls the scope (like singleton, prototype, request, session, applicationcontext, new in spring)
maintains beans’ dependence
BeanFactory is the base of the other modules in springframework.
Collection type for bean’s property:
list
set
map
props
Lazy init for bean: <bean id=”xxx” class=”xxx” lazy-init=”true”>
ApplicationContext: a more useful Ioc container [...]
Categorized in: Java, Scripts · Tagged with: AOP, IOC, Java, Spring
Spring notes(一) – Overview
Spring contains following modules:
Core: the core(beanfactory) of springframework providing bean management
Context: based on BeanFactory, but supports more functions, such as i18n, event-broadcasting, resource-loading, mail, validation, etc.
DAO: series of interfaces that you can choose to implement DAOs.
ORM: corresponding classes for integrating many ORM utilities to springframework.
Web/Web MVC
AOP: AOP function you can use to log or do [...]

(
(4.00 out of 5)