Advanced Java I

1,810 views
1,664 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,810
On SlideShare
0
From Embeds
0
Number of Embeds
20
Actions
Shares
0
Downloads
53
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Advanced Java I

    1. 1. Advanced Java IThread / IO Stream / Reflection
    2. 2. Agenda IThread IO Stream Muti-thread? What is “stream” Lock & PV Operation “synchronized” & “volatile” Input Stream / Output Stream wait() / notify() / notifyAll() Thread VS Runnable Reader / Writer sleep() Buffered xxx InterruptedException Decoration Pattern java.util.concurrent
    3. 3. Agenda II Reflection Class Loader static Class.forName() Class.newInstance() Class / Method Annotation Dynamic Proxy
    4. 4. Thread BasisThread? Process?Muti-ThreadCritical ResourcesLock & PV Operation
    5. 5. Thread in Java “synchronized” ~ method ~ block Synchronize WHAT? “volatile” wait() / notify() / notifyAll() “context”
    6. 6. java.lang.Thread / Runnable sleep() WHO.sleep()? InterruptedException interrupt() / interrupted() / isInterrupted() A “positive” Exception? pause / suspend
    7. 7. Thread in Action I Producer / Consumer Stop Watch
    8. 8. java.util.concurrent java.util.concurrent BlockingQueue BlockingDeque Executors java.util.concurrent.locks java.util.concurrent.locks.ReentrantLock java.util.concurrent.locks.ReentrantReadWriteLock java.util.concurrent.atomic
    9. 9. Thread in Action II Producer / Consumer again BlockingQueue Lottery Lock
    10. 10. Tea Break
    11. 11. IO StreamWhat is Stream?Input Stream / Output Stream java.io.XxxInputStream java.io.XxxOutputStreamReader / WriterBuffered xxx
    12. 12. How To Use Stream?Decoration PatternFile Capitalizer
    13. 13. Class LoaderHow JVM Loads a Class? DelegationHow to Load Our Own Classes? Class.forName() Class.newInstance() ClassLoader.loadClass() / findClass() ClassLoader.defineClass()
    14. 14. Reflection Why Reflecting? Benefits Issues How to Reflect? Class / Method / Constructor / Field Annotation Dynamic Proxy EJB (before 3.0)
    15. 15. Reflection in Action XUnit Class Loader Reflection Annotation Programming by Contract Dynamic Proxy Annotation Again
    16. 16. Q&A

    ×