??xml version="1.0" encoding="utf-8" standalone="yes"?>国产成人免费网站,国产欧美一区二区三区米奇,免费看日本一区二区http://www.aygfsteel.com/javaora/category/3333.htmlzh-cnTue, 27 Feb 2007 08:48:51 GMTTue, 27 Feb 2007 08:48:51 GMT60MyEC 4.1新增的几个功?/title><link>http://www.aygfsteel.com/javaora/archive/2006/04/19/42016.html</link><dc:creator>java世界畅谈</dc:creator><author>java世界畅谈</author><pubDate>Wed, 19 Apr 2006 14:35:00 GMT</pubDate><guid>http://www.aygfsteel.com/javaora/archive/2006/04/19/42016.html</guid><wfw:comment>http://www.aygfsteel.com/javaora/comments/42016.html</wfw:comment><comments>http://www.aygfsteel.com/javaora/archive/2006/04/19/42016.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/javaora/comments/commentRss/42016.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/javaora/services/trackbacks/42016.html</trackback:ping><description><![CDATA[1.增加了一个图形编辑器。呵呵~~,以后单的东西Q在Eclipse中就可以~辑了!<br />2.Spring和Hibernate的自动集?br />3.Jsp EditorQ其实这个东西,我们一般是不做使用的。以前的版本出现的经常性打开很慢的情c?br />4.UML囑Ş<br />5.Javascript<img src ="http://www.aygfsteel.com/javaora/aggbug/42016.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/javaora/" target="_blank">java世界畅谈</a> 2006-04-19 22:35 <a href="http://www.aygfsteel.com/javaora/archive/2006/04/19/42016.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MyEclipse JavaScript Debugger (MyEclipse javascript 调试?http://www.aygfsteel.com/javaora/archive/2006/04/19/42014.htmljava世界畅谈java世界畅谈Wed, 19 Apr 2006 14:24:00 GMThttp://www.aygfsteel.com/javaora/archive/2006/04/19/42014.htmlhttp://www.aygfsteel.com/javaora/comments/42014.htmlhttp://www.aygfsteel.com/javaora/archive/2006/04/19/42014.html#Feedback0http://www.aygfsteel.com/javaora/comments/commentRss/42014.htmlhttp://www.aygfsteel.com/javaora/services/trackbacks/42014.htmlThe MyEclipse JavaScript Debugger is the first fully integrated client-side Eclipse debugger for JavaScript. Feature highlights include:
MyEc Javascript 调试器试首个为Javascript。完整集成客LEclipse调试器。特征主要包含:

  • Debug any web page containing JavaScript source or included JavaScript files, or standalone JavaScript files
  • 调试Mweb面包含Javascript 源代码或包含Javascript 文gQ或者单独的Javascript文g
  • Operations: Pause, Resume, Step Into, Step Over, Step to Return, Terminate
  • 操作Q暂停、重新开始、进入、蟩出、蟩入返回、终?
  • Views: 视图
    • Web Browser View (web 览器视?
    • Call Stack View  Q呼叫堆栈视图)
    • Variables View (变量视图)
    • Console View  Q控制台视图Q?/li>
  • Set JavaScript breakpoints in: 讄javascript断点
    • JavaScript files (Javascript文g)
    • HTML with embedded JavaScript and linked JavaScript files Q包含内|的javascript和关联的javascript文g的HTMLQ?
    • JSP files (jsp 文g)
    • Conditional breakpoints planned for MyEclipse 4.1.1 QؓMyEC的有条g的断点计划)
  • Integrates with Eclipse Launch Manager Q集成Eclipse发行理器)
    • Quick launch from context-menu using "Debug As" (使用Debug As q速调用上下文按钮)
    • Launch from Eclipse Debug toolbar action Q从Eclipse 调试工具条行Z调用Q?
    • Use Launch Profile to modify launch configuration Q)
    • Launch JavaScript resource from project location or deployed MyEclipse web-application


]]>
PriorityQueuecAPI 译http://www.aygfsteel.com/javaora/archive/2005/10/09/15096.htmljava世界畅谈java世界畅谈Sun, 09 Oct 2005 15:10:00 GMThttp://www.aygfsteel.com/javaora/archive/2005/10/09/15096.htmlhttp://www.aygfsteel.com/javaora/comments/15096.htmlhttp://www.aygfsteel.com/javaora/archive/2005/10/09/15096.html#Feedback1http://www.aygfsteel.com/javaora/comments/commentRss/15096.htmlhttp://www.aygfsteel.com/javaora/services/trackbacks/15096.htmlpublic class PriorityQueue<E>extends AbstractQueue<E>implements Serializable
An unbounded priority queue based on a priority heap. This queue orders elements according to an order specified at construction time, which is specified either according to their natural order (see Comparable), or according to a Comparator, depending on which constructor is used. A priority queue does not permit null elements. A priority queue relying on natural ordering also does not permit insertion of non-comparable objects (doing so may result in ClassCastException).
  一个极大的优先队列Z一个优先堆栈。这个队列按照一个限定在构造时间顺序排列元素,q是也是按照它们的自然的序Q查看ComparableQ限定的Q或者按照一个Comparator,依靠使用的构造子。一个优先队列不允许为空元素。一个优先队列依靠自焉序也不允许插入一个非comparable对象Q这样做会生ClassCastException的结果)?/P>

The head of this queue is the least element with respect to the specified ordering. If multiple elements are tied for least value, the head is one of those elements -- ties are broken arbitrarily. The queue retrieval operations poll, remove, peek, and element access the element at the head of the queue.
  q个队列头是最的元素伴随期望限定的排序。如果多个元素ؓ最的值约束,头是q些元素中的一?--U束是Q意打断的。队列获得操作poll(?,remove(U除)Qpeek 和在队列头部的元?/P>

A priority queue is unbounded, but has an internal capacity governing the size of an array used to store the elements on the queue. It is always at least as large as the queue size. As elements are added to a priority queue, its capacity grows automatically. The details of the growth policy are not specified.
  一个优先队列是极大的,但是拥有一个内部的定w调节数组的大用来存储在队列中的元素。它L臛_和队列大是是一样大的。作为元素被加入一个优先队列,它的定w是自动增加的。增加策略的l节是没有指定的?/P>

This class and its iterator implement all of the optional methods of the Collection and Iterator interfaces. The Iterator provided in method iterator() is not guaranteed to traverse the elements of the PriorityQueue in any particular order. If you need ordered traversal, consider using Arrays.sort(pq.toArray()).
  q个cd它的枚D实现所有可选的集合和枚举接口的Ҏ。这个枚举支持iterator()Ҏ是不保证在Q何特定的序遍历PriorityQueue的元素。如果你需要顺序的遍历Q考虑使用Array.sort(pq.toArray()).

Note that this implementation is not synchronized. Multiple threads should not access a PriorityQueue instance concurrently if any of the threads modifies the list structurally. Instead, use the thread-safe PriorityBlockingQueue class.
  注意q个实现不是不同步的。多个线E不应当q发讉K一个PriorityQueue实例Q如果线E在l构上线EQ一个被修改。作为替换,使用U程安全的PriorityBlockingQueuecR?/P>

Implementation note: this implementation provides O(log(n)) time for the insertion methods (offer, poll, remove() and add) methods; linear time for the remove(Object) and contains(Object) methods; and constant time for the retrieval methods (peek, element, and size).

This class is a member of the Java Collections Framework.

 

Since:
1.5
See Also:
Serialized Form



]]>
Package java.util.concurrent(q发) Description http://www.aygfsteel.com/javaora/archive/2005/10/08/14972.htmljava世界畅谈java世界畅谈Sat, 08 Oct 2005 02:43:00 GMThttp://www.aygfsteel.com/javaora/archive/2005/10/08/14972.htmlhttp://www.aygfsteel.com/javaora/comments/14972.htmlhttp://www.aygfsteel.com/javaora/archive/2005/10/08/14972.html#Feedback0http://www.aygfsteel.com/javaora/comments/commentRss/14972.htmlhttp://www.aygfsteel.com/javaora/services/trackbacks/14972.htmlPackage java.util.concurrent(q发) Description

Utility classes commonly useful in concurrent programming. This package includes a few small standardized extensible frameworks, as well as some classes that provide useful functionality and are otherwise tedious(沉闷? or difficult to implement. Here are brief(摘要? descriptions of the main components. See also the locks(? and atomic(原子? packages.

Executors(执行?
Interfaces. Executor is a simple standardized interface for defining custom thread-like subsystems(子系l?, including thread pools(U程?, asynchronous IO(异步IO), and lightweight task frameworks(轻量UQ务框?. Depending on which concrete Executor class is being used, tasks may execute in a newly(以新的方? created thread, an existing task-execution thread, or the thread calling execute(), and may execute sequentially(l箋? or concurrently(q发?. ExecutorService provides a more complete asynchronous(异步? task execution framework. An ExecutorService manages queuing(队列) and scheduling(行程安排) of tasks, and allows controlled shutdown. The ScheduledExecutorService subinterface adds support for delayed(延时? and periodic(定期? task execution. ExecutorServices provide methods arranging(安排? asynchronous execution of any function expressed as Callable, the result-bearing analog(cM? of Runnable. A Future returns the results of a function, allows determination of whether execution has completed, and provides a means to cancel execution.
Implementations. Classes ThreadPoolExecutor and ScheduledThreadPoolExecutor provide tunable(可调?, flexible(灉|? thread pools. The Executors class provides factory methods for the most common kinds and configurations of Executors, as well as a few utility methods for using them. Other utilities based on Executors include the concrete class FutureTask providing a common extensible implementation of Futures, and ExecutorCompletionService, that assists in coordinating(计算调配中心) the processing of groups of asynchronous(异步? tasks.
[Executor  ExecutorService ScheduledExecutorService ScheduledThreadPoolExecutor ExecutionCompletionService]

Queues(队列)
The java.util.concurrent ConcurrentLinkedQueue class supplies an efficient scalable(可升U的) thread-safe(U程安全) non-blocking(非模块化) FIFO queue. Five implementations in java.util.concurrent support the extended BlockingQueue interface, that defines blocking versions of put and take: LinkedBlockingQueue, ArrayBlockingQueue, SynchronousQueue, PriorityBlockingQueue, and DelayQueue. The different classes cover the most common usage contexts for producer-consumer, messaging, parallel tasking, and related concurrent designs.
[LinkedBlockingQueue ArrayBlockingQueue SynchronousQueue PriorityBlockingQueue DelayQueue]

Timing(定时)
The TimeUnit class provides multiple granularities<间隔寸> (including nanoseconds十亿分之一U? for specifying and controlling time-out(暂停) based operations. Most classes in the package contain operations based on time-outs in addition to(?..以外) indefinite(不确定的) waits. In all cases that time-outs are used, the time-out specifies the minimum time that the method should wait before indicating(指出) that it timed-out. Implementations make a "best effort" to detectQ察觉) time-outs as soon as possible after they occur. However, an indefinite(模糊? amount of time may elapse(? between a time-out being detected and a thread actually executing again after that time-out.

Synchronizers(同步)
Four classes aid(帮助) common special-purpose synchronization idioms(语法). Semaphore(旗语) is a classic concurrency tool. CountDownLatch(Countdown 倒数计秒  latch门插销) is a very simple yet very common utility for blocking until a given number of signals, events, or conditions hold. A CyclicBarrier(cyclic 循环?barrier 屏障) is a resettable(可重|的) multiway(多\? synchronization point useful in some styles of parallel programming. An Exchanger allows two threads to exchange(交换) objects at a rendezvous point(集合?, and is useful in several pipeline(道) designs.

Concurrent Collections(q发集合)
Besides Queues, this package supplies a few Collection implementations designed for use in multithreaded contexts: ConcurrentHashMap, CopyOnWriteArrayList, and CopyOnWriteArraySet.
The "Concurrent" prefix used with some classes in this package is a shorthand(速记) indicating several differences from similar "synchronized" classes. For example java.util.Hashtable and Collections.synchronizedMap(new HashMap()) are synchronized. But ConcurrentHashMap is "concurrent". A concurrent collection is thread-safe, but not governed by a single exclusion lock. In the particular case of ConcurrentHashMap, it safely permits any number of concurrent reads as well as a tunable number of concurrent writes. "Synchronized" classes can be useful when you need to prevent all access to a collection via a single lock, at the expense of poorer scalability. In other cases in which multiple threads are expected to access a common collection, "concurrent" versions are normally preferable. And unsynchronized collections are preferable when either collections are unshared, or are accessible only when holding other locks.

Most concurrent Collection implementations (including most Queues) also differ from the usual java.util conventions in that their Iterators provide weakly consistent rather than fast-fail traversal. A weakly consistent iterator is thread-safe, but does not necessarily freeze the collection while iterating, so it may (or may not) reflect any updates since the iterator was created.

 

Since:
1.5



]]>
String.class 的splitҎhttp://www.aygfsteel.com/javaora/archive/2005/09/29/14429.htmljava世界畅谈java世界畅谈Thu, 29 Sep 2005 08:23:00 GMThttp://www.aygfsteel.com/javaora/archive/2005/09/29/14429.htmlhttp://www.aygfsteel.com/javaora/comments/14429.htmlhttp://www.aygfsteel.com/javaora/archive/2005/09/29/14429.html#Feedback1http://www.aygfsteel.com/javaora/comments/commentRss/14429.htmlhttp://www.aygfsteel.com/javaora/services/trackbacks/14429.html  以前的做分隔W获取一个个字符串很是麻烦,其实JDK中的String cdl很好的解决了这个问题。正则表辑ּ实是个好东西!

split

public String[] split(String regex)
Splits this string around matches of the given regular expression.

This method works as if by invoking the two-argument split method with the given expression and a limit argument of zero. Trailing empty strings are therefore not included in the resulting array.

The string "boo:and:foo", for example, yields the following results with these expressions:

Regex Result
: { "boo", "and", "foo" }
o { "b", "", ":and:f" }

Parameters:
regex - the delimiting regular expression
Returns:
the array of strings computed by splitting this string around matches of the given regular expression
Throws:
PatternSyntaxException - if the regular expression's syntax is invalid
Since:
1.4
See Also:
Pattern


]]>
Interface LoginModulehttp://www.aygfsteel.com/javaora/archive/2005/09/18/13312.htmljava世界畅谈java世界畅谈Sun, 18 Sep 2005 13:44:00 GMThttp://www.aygfsteel.com/javaora/archive/2005/09/18/13312.htmlhttp://www.aygfsteel.com/javaora/comments/13312.htmlhttp://www.aygfsteel.com/javaora/archive/2005/09/18/13312.html#Feedback0http://www.aygfsteel.com/javaora/comments/commentRss/13312.htmlhttp://www.aygfsteel.com/javaora/services/trackbacks/13312.html
public interface LoginModule

LoginModule describes the interface implemented by authentication technology providers. LoginModules are plugged in under applications to provide a particular type of authentication.

While applications write to the LoginContext API, authentication technology providers implement the LoginModule interface. A Configuration specifies the LoginModule(s) to be used with a particular login application. Therefore different LoginModules can be plugged in under the application without requiring any modifications to the application itself.

The LoginContext is responsible<负责> for reading the Configuration and instantiating the appropriate<适当?gt; LoginModules. Each LoginModule is initialized with a Subject, a CallbackHandler, shared LoginModule state, and LoginModule-specific options. The Subject represents the Subject currently being authenticated and is updated with relevant<相关> Credentials<凭证> if authentication succeeds. LoginModules use the CallbackHandler to communicate with users. The CallbackHandler may be used to prompt for usernames and passwords, for example. Note that the CallbackHandler may be null. LoginModules which absolutely require a CallbackHandler to authenticate<认证> the Subject may throw a LoginException. LoginModules optionally use the shared state to share information or data among themselves.

NameCallback:
PasswordCallback:

The LoginModule-specific options represent the options configured for this LoginModule by an administrator or user in the login Configuration. The options are defined by the LoginModule itself and control the behavior within it. For example, a LoginModule may define options to support debugging/testing capabilities<能力>. Options are defined using a key-value syntax, such as debug=true. The LoginModule stores the options as a Map so that the values may be retrieved using the key. Note that there is no limit to the number of options a LoginModule chooses to define.

The calling application sees the authentication process as a single operation. However, the authentication process within the LoginModule proceeds in two distinct phases. In the first phase, the LoginModule's login method gets invoked by the LoginContext's login method. The login method for the LoginModule then performs the actual authentication (prompt for and verify a password for example) and saves its authentication status as private state information. Once finished, the LoginModule's login method either returns true (if it succeeded) or false (if it should be ignored), or throws a LoginException to specify a failure. In the failure case, the LoginModule must not retry the authentication or introduce delays. The responsibility of such tasks belongs to the application. If the application attempts to retry the authentication, the LoginModule's login method will be called again.

In the second phase, if the LoginContext's overall<全面> authentication succeeded (the relevant REQUIRED, REQUISITE<需?gt;, SUFFICIENT<_> and OPTIONAL LoginModules succeeded), then the commit method for the LoginModule gets invoked. The commit method for a LoginModule checks its privately saved state to see if its own authentication succeeded. If the overall LoginContext authentication succeeded and the LoginModule's own authentication succeeded, then the commit method associates the relevant<相关> Principals (authenticated identities) and Credentials<凭证> (authentication data such as cryptographic keys) with the Subject located within the LoginModule.

If the LoginContext's overall authentication failed (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules did not succeed), then the abortQ异常) method for each LoginModule gets invoked. In this case, the LoginModule removes/destroys any authentication state originally saved.

Logging out a Subject involves only one phase. The LoginContext invokes the LoginModule's logout method. The logout method for the LoginModule then performs the logout procedures, such as removing Principals or Credentials from the Subject or logging session information.

A LoginModule implementation must have a constructor with no arguments<无参数构造子>. This allows classes which load the LoginModule to instantiate it.



]]>
利用HttpSessionListener实现|站在线人数l计功能http://www.aygfsteel.com/javaora/archive/2005/09/12/12760.htmljava世界畅谈java世界畅谈Mon, 12 Sep 2005 08:06:00 GMThttp://www.aygfsteel.com/javaora/archive/2005/09/12/12760.htmlhttp://www.aygfsteel.com/javaora/comments/12760.htmlhttp://www.aygfsteel.com/javaora/archive/2005/09/12/12760.html#Feedback0http://www.aygfsteel.com/javaora/comments/commentRss/12760.htmlhttp://www.aygfsteel.com/javaora/services/trackbacks/12760.html  我们可以利用Servlet规范中定义的事g监听器(ListenerQ来解决q个问题Q实现更准确的在Uh数统计功能。对每一个正在访问的用户QJ2EE应用服务器会为其建立一个对应的HttpSession对象。当一个浏览器W一ơ访问网站的时候,J2EE应用服务器会新徏一个HttpSession对象Qƈ触发HttpSession创徏事gQ如果注册了HttpSessionListener事g监听器,则会调用HttpSessionListener事g监听器的sessionCreatedҎ。相反,当这个浏览器讉Kl束时的时候,J2EE应用服务器会销毁相应的HttpSession对象Q触发HttpSession销毁事Ӟ同时调用所注册HttpSessionListener事g监听器的sessionDestroyedҎ?BR>  可见Q对应于一个用戯问的开始和l束Q相应的有sessionCreatedҎ和sessionDestroyedҎ执行。这P我们只需要在HttpSessionListener实现cȝsessionCreatedҎ中让计数器加1Q在sessionDestroyedҎ中让计数器减1Q就L实现了网站在Uh数的l计功能?BR>  下面是利用HttpSessionListener实现在线人数l计的一个例子,q个例子已经在中创Y件的J2EE应用服务器InforWeb中测试通过?BR>  首先Q编写一个简单的计数器,代码如下Q?BR>
  1. package gongfei.cmc.articles.onlinecounter;
  2. public class OnlineCounter {
  3.     private static long online = 0;    
  4.     public static long getOnline() {
  5.         return online;
  6.     }    
  7.     public static void raise(){
  8.         online++;
  9.     } 
  10.     public static void reduce(){
  11.         online--;
  12.    }
  13. }

  然后Q编写HttpSessionListener实现c,在这个实现类的sessionCreatedҎ中调用OnlineCounter的raiseҎQ在sessionDestroyedҎ中调用OnlineCounter的reduceҎQ代码如下:
  1. package gongfei.cmc.articles.onlinecounter;
  2. import javax.servlet.http.HttpSessionEvent;
  3. import javax.servlet.http.HttpSessionListener;
  4. public class OnlineCounterListener implements HttpSessionListener {
  5.     public void sessionCreated(HttpSessionEvent hse) {
  6.         OnlineCounter.raise();
  7.     }
  8.     public void sessionDestroyed(HttpSessionEvent hse) {
  9.         OnlineCounter.reduce();
  10.     }
  11. }

  再然后,把这个HttpSessionListener实现cL册到|站应用中,也就是在|站应用的web.xml中加入如下内容:
  1. <web-app>
  2.     …?
  3.     <listener>
  4.         <listener-class>
  5.             gongfei.cmc.articles.example.OnlineCounterListener
  6.         </listener-class>
  7.     </listener>
  8.     …?
  9. </web-app>


原文地址Q?A >http://www.javaresearch.org/article/showarticle.jsp?column=106&thread=18541



]]>
վ֩ģ壺 | | | Դ| Ĭ| | | | | | ޻| ũ| ˼| ޳| ˮ| | Ļ| | ̨| | | ľ| | ɽ| | | Ļ| | | ɽ| | | | | Ҧ| | | | ̨| Ͽ| Ϳ|