??? (try) - PowerPoint PPT Presentation

About This Presentation
Title:

??? (try)

Description:

OSGi: Java (try) cfliao_at_ieee.org Java Java ... – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 21
Provided by: mem101
Learn more at: https://coscup.org
Category:
Tags: osgi | try

less

Transcript and Presenter's Notes

Title: ??? (try)


1
OSGi ?????Java????
??? (try) cfliao_at_ieee.org ????? ?????????????
2
??
  • OSGi Yet another framework ?
  • ????
  • ?????????
  • ??????
  • ?? OSGi?????

3
Java????????
Java cp crack.jarmylib-v3.jarmylib-v2.jarmylib
-v1.jar
org.coscup.s1
org.coscup.s1
org.coscup.s1
A
A
B
B
B
C
C
C
C
D
D
E
4
Java????????
  • ????????package level???
  • Classloader?????classpath?????????
  • ???????????
  • ??classpath???????????????
  • ????????
  • ????????,???????????????????
  • ????????
  • ???????public,??clients?????,????????

5
Java????????
org.coscup.s1
com.evil-empire.client
MySecretA
ClientX
ClientY
org.coscup.s2
ClientZ
???????????????
6
Java?????????Packages?????
org.coscup.s1
com.evil-empire.client
MyScretA
ClientX
ClientY
MyPublicB
org.coscup.s2
?? ?? MyPublicB???????
ClientZ
7
Java???????????????????
org.coscup.s1
A
B
C
?? ????1?
org.coscup.s1
B
C
D
?? ????5?
E
org.coscup.s1 3???
8
????????
????????
????
????
9
????????
????????
???? ????,???,????
Hi,??????????????,????????????,??????????
???? ????,???,????
???? ????,???,????
????????????,?????
???? ???,????
???? ???,????
????
???????
10
OSGi ??
  • ?Intel?IBM?NEC?Mitsubishi?Motorola?NTT?Nokia?Oracl
    e?Samsung?Siemens AG?BenQ??????????????
  • OSGi????????JVM?????????(Universal Middleware)???

11
OSGi??
  • ???1999?,?????????????????????????
  • 2003 ??????????Java????
  • 2004 ??????????????,Eclipse 3.x????OSGi
  • 2006 ???Java????????????OSGi???

12
OSGi????
  • OSGi????????Bundle
  • ???????Bundle???? Java-based?jar??
  • Bundle?????Bundle???????

13
Bundle???
  • ???? (???jar??)
  • /
  • / META-INF/MANIFEST.MF
  • / (java classes)
  • / (.jar)
  • (???????,??????org.osgi.framework.BundleActivator?
    ????)
  • ?MANIFEST.MF?
  • package ?import / export??
  • Bundle?????

14
??Bundle????Java Module
  • ?MANIFEST.MF?????????
  • ????export?????,????????
  • ??????bundle
  • ????import??,???????????

Require-Bundle my-telephony-service

Import-Package org.coscup.telephony
version(1.0.0,1.0.5
locationKitchen
15
Bundle????????
  • ??Classpath
  • Required Bundle
  • Imported Bundle
  • Local classpath

16
Bundles??????
  • ???OSGi????????????????????????
  • ???????Bundle????????,????????Bundles????

17
Bundles??????
  • Bundles???????????????POJO???ServiceRegistry?
  • ????(publish)???(discovery)???(bind)??????

ServiceReference sr context.getServiceReference(
EventAdmin.class.getName()) EventAdmin ea
(EventAdmin) context.getService(sr)
18
?????????????
  • ???????????????
  • ????????????
  • ???????????
  • ????
  • ServiceTracker??
  • Spring OSGi

19
?????????
  • OSGi ???
  • Knopflerfish
  • Felix (Apache??,???Oscar)
  • Equinox (Eclipse??)
  • OSGi????
  • Eclipse Maven
  • Eclipse Knopflerfish Plugin

Equinox
20
OSGi?????
  • JSR 291?JSR 277??
  • OSGi?J2SE 7?Java EE6????
  • Distributed OSGi (RFC119)
Write a Comment
User Comments (0)
About PowerShow.com