Tutorial for the Java Context Awareness Framework (JCAF), version 1.5

1 Introduction 22 Installing and Running JCAF 32.1 Deploying new Classes . . . . . . . . . . . . . . . . . . . . . . . . 43 Context Modelling 53.1 The Entity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53.2 The Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63.3 The contextChanged() method . . . . . . . . . . . . . . . . . . 74 The Context Service 84.1 Contacting a Context Service . . . . . . . . . . . . . . . . . . . . 84.2 Getting and Setting Context Information . . . . . . . . . . . . . 85 Context Clients 105.1 The AbstractContextClient class . . . . . . . . . . . . . . . . . 105.2 Context Monitors . . . . . . . . . . . . . . . . . . . . . . . . . . . 105.3 Context Actuators . . . . . . . . . . . . . . . . . . . . . . . . . . 125.4 Entity Listeners . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 Security 147 Peer-to-Peer Context Services 157.1 Setting up P2P Context Services . . . . . . . . . . . . . . . . . . 157.2 Looking up Entities in a P2P Network . . . . . . . . . . . . . . . 158 Examples 171