AP Course Course Personal Assistant (PA) for people with disabilities
Next Saturday we present the Personal Assistant Course organized by the Association GAMS and Blue:
Course Personal Assistant (PA) for people with disabilities
For people who want to work as personal assistants, people wishing to use the services of an AP and AP family members from
Times and Time: Saturday 22 and May 29, 5 and June 12 from 9 to 16:30
Contents: Module 1
. Introduction: disability, concepts and historical development, legal, real frame, personal assistance
Module 2. Personal assistant functions
Module 3. The individual user of personal assistance
This course is organized and delivered with the involvement of users of personal assistance.
Future personal assistants will be trained to work in support of a disabled person in the development of their daily life, embedded in the community and participate fully in it, as conceived by the principles of Independent Living and the Convention on the Rights of Persons with Disabilities United Nations.
Certificates will be given
For more information, please contact
Saturday, May 15, 2010
Sunday, May 9, 2010
Rooftop, Cargo Box, Voyager
OSGi (First Steps) Best Practices
I decided to make this post because I did not find any tutorial that explain OSGi from scratch, I clarify that this post will make an introduction so that later we can continue with something more advanced.
What is OSGi?
OSGI (Open Services Gateway Initiative), could be defined as a system (or framework) to modular Java provides ways to create modules and how these interact with each other at runtime. OSGi tries to solve the problems of the traditional "classloader" virtual machine and Java application servers. In OSGI, each module has its own separate from the rest classpath classpath the other modules.
This framework provides developers with an environment-oriented and component-based services, providing standards to manage the software life cycle.
OSGi is divided into layers, which we'll cover next post by now known to mention their existence.
Layer Security.
Module Layer. Life Cycle Layer
.
Service Layer.
Execution Environment.
OSGi Alliance The OSGi Alliance is a consortium of technology companies worldwide that seeks to ensure interoperability of applications and services based on this platform between the companies comprising the consortium, we find companies of various types: automotive, aerospace, appliance manufacturers, telecommunications, phone manufacturers ... Some examples of Members: Motorola, Nokia, Mitsubishi Electric Corporation, Vodafone Group Services, LinkedIn, LG Electronics ...
The alliance provides specifications, reference implementations, test suites and certification. OSGi Specification
OSGI framework provides a general purpose java, secure and managed to
supports dynamic deployment of applications known as "Bundles" or modules.
Some of the features that make this framework work:
good thing about having a modular application is that unlike a deployable web application we will independent units which can be changed very easily, this means that if we need to replace a module by another often not be necessary to stop all but certain application modules and everything would go walking, we also have versioning Bundles (modules) which is very useful to be making our modules but some use other specific version.
We can find several OSGi-certified platforms that comply with the specification so that if we develop yourselves our modules they could run in any of these implementations, some of them are:
OSGi environment for this post will use the Eclipse Equinox implementation of our examples, we went to Eclipse Equinox from here can you download the working environment, we have several options:
implementation
Download OSGI base: This is a file. jar (bundle)
that contains the basic elements to run our environment.
equinox Download Complete: This is a file. Zip file containing the base
bundle mentioned above, plus all the configurations and implementations
OSGI services.
Downloading
optional bundles: With this option you can download one by one
equinox bundles that implement various
OSGI services.
For this example we will go down a full download to make things easier, then we can unpack this zip on our record. Inside the zip folder you downloaded plugins find a jar called org.eclipse.osgi_3.x.x_xxx.jar which is useful for both the first lifts the OSGi environment and from here we can install, start, stop, uninstall our modules , and we can also use this jar to develop in the eclipse as it contains classes / interfaces of the OSGi implementation. I leave a print screen of my eclipse development the example below.
OSGiEclipse.png
Basic Example
As is typical start with a Hello World, bone here would not be building an application that says Hello World, but that would be creating a module which live in an OSGi has to contend entire life cycle. Basically create a module would create a jar with our classes and a MANIFEST.MF file
Understanding the MANIFEST.MF
The Manifesft.mf is just a text file in which type directives add key: value , which play an important role since they are saying they will go to some OSGi framework of the important things about our module then show an example and explain Manifest directives.
Sets the version of the file MANIFEST.MF.
Bundle-ManifestVersion
Indicates OSGi specification is based on the bundle. By default, if not indicated anything, the value is 1. This value indicates that the bundle is based on the rules of the OSGI specification 3. If you have value 2, this will be the OSGI specification 4.
Bundle-Name Specifies the short name of the bundle must be human-readable.
Bundle-SymbolicName
This tag defines a unique name for the bundle. This name is the one that will work in the runtime environment.
Bundle-Version Indicates the version of our bundle, in our environment may have different versions of the same bundle.
Bundle-Activator
Indicates that function as Activator class, which is a class must implement the interface BundleActivator so that we can enter into the life cycle of our Bundle.
Import-Package Through this policy we say we want to import packages, if we think this line is very important because we only have our classes jar but for example BundleActivator interface is already part of the core module OSGi so would not be in our jar so through the import of this directive for all work.
Implementing our
Activator package
then able to create our module packaged as a jar we could use the eclipse or the jar command that comes with java, the jar we should be as follows
java-jar-console org.eclipse.osgi_3.x.x_xxx.jar
Now install our bundle (. Jar) will copy our bundle at Drive C: \\ and run the command
install file: c: \\ com.
javacuriosities.osgi.helloworld_1.0.0.jar
if all goes well you will see a message like XX Bundle id is now with this id and we can begin, shut down and remove our module. To test these two commands execute.
start
XX -> There you will see our message of the start method of the Activator class. Stop
XX -> There you will see our message stop method of the Activator class.
attached a screen of the console commands.
OSGiConsole.png
Well this has been for this post, I hope I was clear enough to understand the example and the basic concepts of OSGi, any questions or suggestions are welcome.
Greetings and see you soon.
I decided to make this post because I did not find any tutorial that explain OSGi from scratch, I clarify that this post will make an introduction so that later we can continue with something more advanced.
What is OSGi?
OSGI (Open Services Gateway Initiative), could be defined as a system (or framework) to modular Java provides ways to create modules and how these interact with each other at runtime. OSGi tries to solve the problems of the traditional "classloader" virtual machine and Java application servers. In OSGI, each module has its own separate from the rest classpath classpath the other modules.
This framework provides developers with an environment-oriented and component-based services, providing standards to manage the software life cycle.
OSGi is divided into layers, which we'll cover next post by now known to mention their existence.
Layer Security.
Module Layer. Life Cycle Layer
.
Service Layer.
Execution Environment.
OSGi Alliance The OSGi Alliance is a consortium of technology companies worldwide that seeks to ensure interoperability of applications and services based on this platform between the companies comprising the consortium, we find companies of various types: automotive, aerospace, appliance manufacturers, telecommunications, phone manufacturers ... Some examples of Members: Motorola, Nokia, Mitsubishi Electric Corporation, Vodafone Group Services, LinkedIn, LG Electronics ...
The alliance provides specifications, reference implementations, test suites and certification. OSGi Specification
OSGI framework provides a general purpose java, secure and managed to
supports dynamic deployment of applications known as "Bundles" or modules.
Some of the features that make this framework work:
- is a modular system for the Java platform. Includes
- visibility rules, dependency management and versioning of bundles.
- is dynamic.
- Installation, start, stop, update and uninstallation of bundles is done dynamically at runtime without having to completely stop the
platform. - is a service-oriented architecture.
- Services can be recorded and consumed within the VM. OSGi Implementacones
good thing about having a modular application is that unlike a deployable web application we will independent units which can be changed very easily, this means that if we need to replace a module by another often not be necessary to stop all but certain application modules and everything would go walking, we also have versioning Bundles (modules) which is very useful to be making our modules but some use other specific version.
We can find several OSGi-certified platforms that comply with the specification so that if we develop yourselves our modules they could run in any of these implementations, some of them are:
- Apache Felix.
- Eclipse Equinox.
- Knopflerfish.
- Newton Project. Preparing
OSGi environment for this post will use the Eclipse Equinox implementation of our examples, we went to Eclipse Equinox from here can you download the working environment, we have several options:
implementation
Download OSGI base: This is a file. jar (bundle)
that contains the basic elements to run our environment.
equinox Download Complete: This is a file. Zip file containing the base
bundle mentioned above, plus all the configurations and implementations
OSGI services.
Downloading
optional bundles: With this option you can download one by one
equinox bundles that implement various
OSGI services.
For this example we will go down a full download to make things easier, then we can unpack this zip on our record. Inside the zip folder you downloaded plugins find a jar called org.eclipse.osgi_3.x.x_xxx.jar which is useful for both the first lifts the OSGi environment and from here we can install, start, stop, uninstall our modules , and we can also use this jar to develop in the eclipse as it contains classes / interfaces of the OSGi implementation. I leave a print screen of my eclipse development the example below.
OSGiEclipse.png
Basic Example
As is typical start with a Hello World, bone here would not be building an application that says Hello World, but that would be creating a module which live in an OSGi has to contend entire life cycle. Basically create a module would create a jar with our classes and a MANIFEST.MF file
Understanding the MANIFEST.MF
The Manifesft.mf is just a text file in which type directives add key: value , which play an important role since they are saying they will go to some OSGi framework of the important things about our module then show an example and explain Manifest directives.
Manifest-Version: 1.0 Bundle-ManifestVersion
: 2
Bundle-Name: HelloWorld Bundle-SymbolicName
: com.javacuriosities.osgi.helloworld
Bundle-Version: 1.0.0 Bundle-Activator
: com.javacuriosities.
osgi.helloworld.Activator Import-Package: org.osgi.framework, specification-version = "1.4.0"
Manifest-Version Sets the version of the file MANIFEST.MF.
Bundle-ManifestVersion
Indicates OSGi specification is based on the bundle. By default, if not indicated anything, the value is 1. This value indicates that the bundle is based on the rules of the OSGI specification 3. If you have value 2, this will be the OSGI specification 4.
Bundle-Name Specifies the short name of the bundle must be human-readable.
Bundle-SymbolicName
This tag defines a unique name for the bundle. This name is the one that will work in the runtime environment.
Bundle-Version Indicates the version of our bundle, in our environment may have different versions of the same bundle.
Bundle-Activator
Indicates that function as Activator class, which is a class must implement the interface BundleActivator so that we can enter into the life cycle of our Bundle.
Import-Package Through this policy we say we want to import packages, if we think this line is very important because we only have our classes jar but for example BundleActivator interface is already part of the core module OSGi so would not be in our jar so through the import of this directive for all work.
Implementing our
Activator package
com.javacuriosities.osgi.helloworld;
org.osgi.framework.BundleActivator
import, import
org.osgi.framework.BundleContext;
public class Activator implements BundleActivator
{
@ Override public void start (BundleContext arg0) throws Exception {
System.out.println ("Hello World");}
@ Override public void stop (BundleContext arg0) throws
Exception {System.out.println ("Bye Bye");
}}
Packaging and installing then able to create our module packaged as a jar we could use the eclipse or the jar command that comes with java, the jar we should be as follows
com.javacuriosities.osgi.helloworld_1.0.0.jar
com \\ javacuriosities \\ osgi \\ helloworld \\ Activar.class
META-INF \\ MANIFEST.MF
We begin our OSGi environment for this, do the following go to the directory where you unpack the Eclipse Equinox and environment within the plugins folder, execute the following command line, then see the prompt changes to osgi> ss and there will to see our bundles installed. java-jar-console org.eclipse.osgi_3.x.x_xxx.jar
Now install our bundle (. Jar) will copy our bundle at Drive C: \\ and run the command
install file: c: \\ com.
javacuriosities.osgi.helloworld_1.0.0.jar
if all goes well you will see a message like XX Bundle id is now with this id and we can begin, shut down and remove our module. To test these two commands execute.
start
XX -> There you will see our message of the start method of the Activator class. Stop
XX -> There you will see our message stop method of the Activator class.
attached a screen of the console commands.
OSGiConsole.png
Well this has been for this post, I hope I was clear enough to understand the example and the basic concepts of OSGi, any questions or suggestions are welcome.
Greetings and see you soon.
Subscribe to:
Posts (Atom)