KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > net > proxy > IProxyChangeEvent


1 /*******************************************************************************
2  * Copyright (c) 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.core.net.proxy;
12
13
14 /**
15  * Event which describes a change in the proxy information managed by
16  * the {@link IProxyService}.
17  * <p>
18  * This interface is not intended to be implemented by clients.
19  * @see IProxyService
20  * @since 1.0
21  */

22 public interface IProxyChangeEvent {
23     
24     /**
25      * Type constant that indicates that the list of non-proxied hosts has changed.\
26      * @see #getChangeType()
27      */

28     public static final int NONPROXIED_HOSTS_CHANGED = 1;
29     
30     /**
31      * Type constant that indicates that the data for one or more proxies has changed
32      * @see #getChangeType()
33      */

34     public static final int PROXY_DATA_CHANGED = 2;
35
36     /**
37      * Type constant that indicates that the enablement of the proxy
38      * service has changed. Client should consult the service to determine
39      * the current enablement
40      * @see #getChangeType()
41      * @see IProxyService#isProxiesEnabled()
42      */

43     public static final int PROXY_SERVICE_ENABLEMENT_CHANGE = 3;
44     
45     /**
46      * Return the type of change this event represents. Clients
47      * should ignore types they do not recognize.
48      * @return the type of change this event represents
49      * @see #NONPROXIED_HOSTS_CHANGED
50      * @see #PROXY_DATA_CHANGED
51      */

52     public int getChangeType();
53     
54     /**
55      * For a change type of {@link #NONPROXIED_HOSTS_CHANGED}, this method will
56      * return the list of non-proxied hosts before the change occurred.
57      * @return the list of non-proxied hosts before the change occurred
58      */

59     public String JavaDoc[] getOldNonProxiedHosts();
60     
61     /**
62      * For a change type of {@link #NONPROXIED_HOSTS_CHANGED}, this method will
63      * return the list of non-proxied hosts after the change occurred.
64      * @return the list of non-proxied hosts after the change occurred
65      */

66     public String JavaDoc[] getNonProxiedHosts();
67     
68     /**
69      * For a change type of {@link #PROXY_DATA_CHANGED}, this method returns
70      * the state of all known proxies before the change occurred.
71      * @return the state of all known proxies before the change occurred
72      */

73     public IProxyData[] getOldProxyData();
74     
75     /**
76      * For a change type of {@link #PROXY_DATA_CHANGED}, this method returns
77      * the state of the changed known proxies after the change occurred. Clients
78      * should check the {@link IProxyService#isProxiesEnabled()} method to see
79      * if the proxy data change was the result of proxies being disabled.
80      * @return the state of the changed known proxies after the change occurred
81      */

82     public IProxyData[] getChangedProxyData();
83
84 }
85
Popular Tags