A Toolkit for Context-aware Systems using Java Reflection and Method Overloading
Jongmyung Choi · Jeongbo gwahaghoe nonmunji. so'peuteuweeo mich eung'yong · 2012
In this paper, we introduce a Java-based, object-oriented toolkit for context-aware systems named jContext. It supports branch style and trigger style context-aware services, and it has four interesting features. First, it represents contexts as classes in the programming language. Second, it represents the different operations executed according to contexts as methods, rather than code fragments, thus allowing the operations to be modular. In addition, methods with the same semantics are represented by method overloading, and have a context class as their first parameter. Third, method calls from outside of class are business logic-oriented and don't have any context class parameters. Internally, these method calls automatically invoke other context- related methods using Java reflection. Fourth, jContext adopts a layered architecture, and its functional units are modular, so that each of them is replaceable and extensible. These features allow jContext to be flexible and extensible, so that it supports new contexts, allows existing APIs to be context-aware, and extends the existing systems into context- aware systems.