提交 594bc273 编写于 作者: A alanb

8000362: (pack200) Deprecate Packer/Unpacker addPropertyChangeLister and...

8000362: (pack200) Deprecate Packer/Unpacker addPropertyChangeLister and removePropertyChangeListener methods
Reviewed-by: lancea, chegar, mchung, ksrini
上级 3f152b10
/* /*
* Copyright (c) 2003,2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -456,12 +456,12 @@ public abstract class Pack200 { ...@@ -456,12 +456,12 @@ public abstract class Pack200 {
* The unpacker's progress as a percentage, as periodically * The unpacker's progress as a percentage, as periodically
* updated by the unpacker. * updated by the unpacker.
* Values of 0 - 100 are normal, and -1 indicates a stall. * Values of 0 - 100 are normal, and -1 indicates a stall.
* Observe this property with a {@link PropertyChangeListener}. * Progress can be monitored by polling the value of this
* property.
* <p> * <p>
* At a minimum, the unpacker must set progress to 0 * At a minimum, the unpacker must set progress to 0
* at the beginning of a packing operation, and to 100 * at the beginning of a packing operation, and to 100
* at the end. * at the end.
* @see #addPropertyChangeListener
*/ */
String PROGRESS = "pack.progress"; String PROGRESS = "pack.progress";
...@@ -577,7 +577,15 @@ public abstract class Pack200 { ...@@ -577,7 +577,15 @@ public abstract class Pack200 {
* @see #properties * @see #properties
* @see #PROGRESS * @see #PROGRESS
* @param listener An object to be invoked when a property is changed. * @param listener An object to be invoked when a property is changed.
*/ * @deprecated The dependency on {@code PropertyChangeListener} creates
* a significant impediment to future modularization of the
* Java platform. This method will be removed in a future
* release.
* Applications that need to monitor progress of the packer
* can poll the value of the {@link #PROGRESS PROGRESS}
* property instead.
*/
@Deprecated
void addPropertyChangeListener(PropertyChangeListener listener) ; void addPropertyChangeListener(PropertyChangeListener listener) ;
/** /**
...@@ -586,7 +594,12 @@ public abstract class Pack200 { ...@@ -586,7 +594,12 @@ public abstract class Pack200 {
* *
* @see #addPropertyChangeListener * @see #addPropertyChangeListener
* @param listener The PropertyChange listener to be removed. * @param listener The PropertyChange listener to be removed.
* @deprecated The dependency on {@code PropertyChangeListener} creates
* a significant impediment to future modularization of the
* Java platform. This method will be removed in a future
* release.
*/ */
@Deprecated
void removePropertyChangeListener(PropertyChangeListener listener); void removePropertyChangeListener(PropertyChangeListener listener);
} }
...@@ -640,12 +653,12 @@ public abstract class Pack200 { ...@@ -640,12 +653,12 @@ public abstract class Pack200 {
* The unpacker's progress as a percentage, as periodically * The unpacker's progress as a percentage, as periodically
* updated by the unpacker. * updated by the unpacker.
* Values of 0 - 100 are normal, and -1 indicates a stall. * Values of 0 - 100 are normal, and -1 indicates a stall.
* Observe this property with a {@link PropertyChangeListener}. * Progress can be monitored by polling the value of this
* property.
* <p> * <p>
* At a minimum, the unpacker must set progress to 0 * At a minimum, the unpacker must set progress to 0
* at the beginning of a packing operation, and to 100 * at the beginning of a packing operation, and to 100
* at the end. * at the end.
* @see #addPropertyChangeListener
*/ */
String PROGRESS = "unpack.progress"; String PROGRESS = "unpack.progress";
...@@ -708,7 +721,15 @@ public abstract class Pack200 { ...@@ -708,7 +721,15 @@ public abstract class Pack200 {
* @see #properties * @see #properties
* @see #PROGRESS * @see #PROGRESS
* @param listener An object to be invoked when a property is changed. * @param listener An object to be invoked when a property is changed.
*/ * @deprecated The dependency on {@code PropertyChangeListener} creates
* a significant impediment to future modularization of the
* Java platform. This method will be removed in a future
* release.
* Applications that need to monitor progress of the
* unpacker can poll the value of the {@link #PROGRESS
* PROGRESS} property instead.
*/
@Deprecated
void addPropertyChangeListener(PropertyChangeListener listener) ; void addPropertyChangeListener(PropertyChangeListener listener) ;
/** /**
...@@ -717,7 +738,12 @@ public abstract class Pack200 { ...@@ -717,7 +738,12 @@ public abstract class Pack200 {
* *
* @see #addPropertyChangeListener * @see #addPropertyChangeListener
* @param listener The PropertyChange listener to be removed. * @param listener The PropertyChange listener to be removed.
* @deprecated The dependency on {@code PropertyChangeListener} creates
* a significant impediment to future modularization of the
* Java platform. This method will be removed in a future
* release.
*/ */
@Deprecated
void removePropertyChangeListener(PropertyChangeListener listener); void removePropertyChangeListener(PropertyChangeListener listener);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册