This is the hook usage in Java. Apache mina2.x is used in this way.
Abstract class
Package COM. jadyer. hook; public abstract class iosession {public void write (Object message) {system. out. println (Message); messagesend (this);} public
An adapter is used to allow classes that implement different interfaces to work collaboratively.
1. Define a Target Interface target provided to the customer
2. Define a class result to be adapted
3. Define an adapter
// Public interface
1. Factory-try to catch up with mm. The chicken wings of McDonald's and the chicken wings of KFC are what mm loves. Although the taste is different, whether you take mm to McDonald's or KFC, just say "four chicken wings" to the waiter. McDonald's
Directory [Click to browse]1... junit3.82... junit4.x3 .. use cactus for In-container Testing4 .. use easymock for simulated testing5 .. use jmock for Simulation Testing6 .. use junitperf for Performance Testing7 .. use cobertura to measure test
HTTP resumable upload using Java(1) Principle of resumable Data Transfer
In fact, the principle of resumable upload is very simple, that is, the HTTP request is different from the general download. For example, when a browser requests a file on the
Proxy: one role represents another role to complete some specific functions. When we need to add logic before and after a method (logs, transactions, etc.), we can use a proxy.
Static proxy can be implemented in two ways: inheritance and aggregation.
1. Simple factory mode: I create a "God class" to create all classes.
2. Factory method mode: Abstract The factory class and create a factory class that is not a type.
3. Abstract Factory mode: Create an abstract factory parent class, suitable for
Today, I have finally finished reviewing the basic syntax, And I have finished learning the document. I will try to improve it a little bit.
Because I used Xu yingxiao's "Java syntax and network application design" book at school, I used an example
Describe the difference between a thread and a process?
What is a Windows service and how does its lifecycle differ from a "standard" EXE?
What is the maximum amount of memory any single process on Windows can address? Is this different than the
Java learning path
Java learning path (I) Tools
I. JDK (Java Development Kit)
JDK is the core of the entire Java, including the Java Runtime Environment (Java runtime envirnment), a bunch of Java tools and the Basic Java class library (RT. Jar ).
1. object initialization
(1) Non-static object initialization
When an object is created, all data members of the class where the object is located are initialized first.
Basic Type: int type, initialized to 0.
For objects: these objects are
Environment
JBoss 6.0 + myeclipse 8.6 + MySQL 5.1 + Struts 2.3 + EJB 3.0
Problem
The following exception occurs when JBoss is started:
[ClassLoaderManager] Unexpected error during load of:org.w3c.dom.TypeInfo: java.lang.LinkageError: loader
There are 6 compression modes for ZIP files: storage, fastest, fast, standard, good, and best.
This example demonstrates how to copy a zip file, set the best sub-item and store the two modes, and make a backup. Haha...
1. Use jaroutputstream.
I have been thinking about a question: how to describe the computer ?????In the past, when I was studying C language, I often talked to my classmates about this problem. Basically, there were not a few comprehensive descriptions, including myself. I
Bored, I think I have not implemented it myself. Write. Memo.
Producer and consumer problem description
One producer thread is in the production product and put into the warehouse, and the other consumer thread extracts the product from the
Requirement: According to the input number N, such as: 3, 5, 7... to display n rows of n columns in a matrix, these numbers are from 1 ~ N * n: The sum of N numbers on each column of the Matrix and the diagonal line must be equal.Prerequisites:In
I. reflection mechanism of Java
The recent research on Java is very powerful, mainly based on reading blog posts. The following are some of my thoughts on the reflection mechanism of Java. I hope you will not be able to point out any mistakes. I
Do not want to use programs encapsulated by others, such as wrapper service. Use your own script.
1. Create a start. Sh script to run the Java program:
-UU-:----F1 master_rest 18% L25 (Shell-script[sh])----------------------------------------
Reprinted from: http://www.csdn.net/article/2012-06-29/2806999
This article mainly explains the working principle of Java memory allocation stack, heap and constant pool in detail.
I. Memory prototype of Java Virtual Machine
Register: we cannot
Calling parameters in Java is an array Stored Procedure
1. The Stored Procedure and type are defined as follows:
-- The array in Oracle
Create or replace type idarray as table of varchar2 (20 );
-- Package Header
Create or replace package
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service