Thomas Vachuska

Cleaned up a slew of Javadoc errors in preparation for switch over to Java 8.

Showing 39 changed files with 119 additions and 100 deletions
...@@ -30,9 +30,10 @@ public class RouteUpdate { ...@@ -30,9 +30,10 @@ public class RouteUpdate {
30 30
31 /** 31 /**
32 * Specifies the type of a route update. 32 * Specifies the type of a route update.
33 - * <p/> 33 + * <p>
34 * Route updates can either provide updated information for a route, or 34 * Route updates can either provide updated information for a route, or
35 * withdraw a previously updated route. 35 * withdraw a previously updated route.
36 + * </p>
36 */ 37 */
37 public enum Type { 38 public enum Type {
38 /** 39 /**
......
...@@ -439,11 +439,12 @@ public class Router implements RouteListener { ...@@ -439,11 +439,12 @@ public class Router implements RouteListener {
439 439
440 /** 440 /**
441 * Processes adding a route entry. 441 * Processes adding a route entry.
442 - * <p/> 442 + * <p>
443 * Put new route entry into the radix tree. If there was an existing 443 * Put new route entry into the radix tree. If there was an existing
444 * next hop for this prefix, but the next hop was different, then execute 444 * next hop for this prefix, but the next hop was different, then execute
445 * deleting old route entry. If the next hop is the SDN domain, we do not 445 * deleting old route entry. If the next hop is the SDN domain, we do not
446 * handle it at the moment. Otherwise, execute adding a route. 446 * handle it at the moment. Otherwise, execute adding a route.
447 + * </p>
447 * 448 *
448 * @param routeEntry the route entry to add 449 * @param routeEntry the route entry to add
449 */ 450 */
...@@ -484,11 +485,12 @@ public class Router implements RouteListener { ...@@ -484,11 +485,12 @@ public class Router implements RouteListener {
484 485
485 /** 486 /**
486 * Executes adding a route entry. 487 * Executes adding a route entry.
487 - * <p/> 488 + * <p>
488 * Find out the egress Interface and MAC address of next hop router for 489 * Find out the egress Interface and MAC address of next hop router for
489 * this route entry. If the MAC address can not be found in ARP cache, 490 * this route entry. If the MAC address can not be found in ARP cache,
490 * then this prefix will be put in routesWaitingOnArp queue. Otherwise, 491 * then this prefix will be put in routesWaitingOnArp queue. Otherwise,
491 * new route intent will be created and installed. 492 * new route intent will be created and installed.
493 + * </p>
492 * 494 *
493 * @param routeEntry the route entry to add 495 * @param routeEntry the route entry to add
494 */ 496 */
...@@ -614,9 +616,10 @@ public class Router implements RouteListener { ...@@ -614,9 +616,10 @@ public class Router implements RouteListener {
614 616
615 /** 617 /**
616 * Executes deleting a route entry. 618 * Executes deleting a route entry.
617 - * <p/> 619 + * <p>
618 * Removes prefix from radix tree, and if successful, then try to delete 620 * Removes prefix from radix tree, and if successful, then try to delete
619 * the related intent. 621 * the related intent.
622 + * </p>
620 * 623 *
621 * @param routeEntry the route entry to delete 624 * @param routeEntry the route entry to delete
622 */ 625 */
......
...@@ -114,9 +114,10 @@ public class BgpRouteEntry extends RouteEntry { ...@@ -114,9 +114,10 @@ public class BgpRouteEntry extends RouteEntry {
114 114
115 /** 115 /**
116 * Tests whether the route is originated from the local AS. 116 * Tests whether the route is originated from the local AS.
117 - * <p/> 117 + * <p>
118 * The route is considered originated from the local AS if the AS Path 118 * The route is considered originated from the local AS if the AS Path
119 * is empty or if it begins with an AS_SET. 119 * is empty or if it begins with an AS_SET.
120 + * </p>
120 * 121 *
121 * @return true if the route is originated from the local AS, otherwise 122 * @return true if the route is originated from the local AS, otherwise
122 * false 123 * false
...@@ -134,9 +135,10 @@ public class BgpRouteEntry extends RouteEntry { ...@@ -134,9 +135,10 @@ public class BgpRouteEntry extends RouteEntry {
134 135
135 /** 136 /**
136 * Gets the BGP Neighbor AS number the route was received from. 137 * Gets the BGP Neighbor AS number the route was received from.
137 - * <p/> 138 + * <p>
138 * If the router is originated from the local AS, the return value is 139 * If the router is originated from the local AS, the return value is
139 * zero (BGP_AS_0). 140 * zero (BGP_AS_0).
141 + * </p>
140 * 142 *
141 * @return the BGP Neighbor AS number the route was received from. 143 * @return the BGP Neighbor AS number the route was received from.
142 */ 144 */
...@@ -154,9 +156,10 @@ public class BgpRouteEntry extends RouteEntry { ...@@ -154,9 +156,10 @@ public class BgpRouteEntry extends RouteEntry {
154 156
155 /** 157 /**
156 * Tests whether the AS Path contains a loop. 158 * Tests whether the AS Path contains a loop.
157 - * <p/> 159 + * <p>
158 * The test is done by comparing whether the AS Path contains the 160 * The test is done by comparing whether the AS Path contains the
159 * local AS number. 161 * local AS number.
162 + * </p>
160 * 163 *
161 * @param localAsNumber the local AS number to compare against 164 * @param localAsNumber the local AS number to compare against
162 * @return true if the AS Path contains a loop, otherwise false 165 * @return true if the AS Path contains a loop, otherwise false
...@@ -175,9 +178,10 @@ public class BgpRouteEntry extends RouteEntry { ...@@ -175,9 +178,10 @@ public class BgpRouteEntry extends RouteEntry {
175 /** 178 /**
176 * Compares this BGP route against another BGP route by using the 179 * Compares this BGP route against another BGP route by using the
177 * BGP Decision Process. 180 * BGP Decision Process.
178 - * <p/> 181 + * <p>
179 * NOTE: The comparison needs to be performed only on routes that have 182 * NOTE: The comparison needs to be performed only on routes that have
180 * same IP Prefix. 183 * same IP Prefix.
184 + * </p>
181 * 185 *
182 * @param other the BGP route to compare against 186 * @param other the BGP route to compare against
183 * @return true if this BGP route is better than the other BGP route 187 * @return true if this BGP route is better than the other BGP route
...@@ -389,8 +393,9 @@ public class BgpRouteEntry extends RouteEntry { ...@@ -389,8 +393,9 @@ public class BgpRouteEntry extends RouteEntry {
389 393
390 /** 394 /**
391 * Compares whether two objects are equal. 395 * Compares whether two objects are equal.
392 - * <p/> 396 + * <p>
393 * NOTE: The bgpSession field is excluded from the comparison. 397 * NOTE: The bgpSession field is excluded from the comparison.
398 + * </p>
394 * 399 *
395 * @return true if the two objects are equal, otherwise false. 400 * @return true if the two objects are equal, otherwise false.
396 */ 401 */
...@@ -422,8 +427,9 @@ public class BgpRouteEntry extends RouteEntry { ...@@ -422,8 +427,9 @@ public class BgpRouteEntry extends RouteEntry {
422 427
423 /** 428 /**
424 * Computes the hash code. 429 * Computes the hash code.
425 - * <p/> 430 + * <p>
426 * NOTE: We return the base class hash code to avoid expensive computation 431 * NOTE: We return the base class hash code to avoid expensive computation
432 + * </p>
427 * 433 *
428 * @return the object hash code 434 * @return the object hash code
429 */ 435 */
......
...@@ -215,11 +215,11 @@ public class BgpSession extends SimpleChannelHandler { ...@@ -215,11 +215,11 @@ public class BgpSession extends SimpleChannelHandler {
215 215
216 /** 216 /**
217 * Tests whether the session is closed. 217 * Tests whether the session is closed.
218 - * <p/> 218 + * <p>
219 * NOTE: We use this method to avoid the Netty's asynchronous closing 219 * NOTE: We use this method to avoid the Netty's asynchronous closing
220 * of a channel. 220 * of a channel.
221 - * 221 + * </p>
222 - * @param return true if the session is closed 222 + * @return true if the session is closed
223 */ 223 */
224 boolean isClosed() { 224 boolean isClosed() {
225 return isClosed; 225 return isClosed;
...@@ -1641,7 +1641,7 @@ public class BgpSession extends SimpleChannelHandler { ...@@ -1641,7 +1641,7 @@ public class BgpSession extends SimpleChannelHandler {
1641 * @param errorCode the BGP NOTIFICATION Error Code 1641 * @param errorCode the BGP NOTIFICATION Error Code
1642 * @param errorSubcode the BGP NOTIFICATION Error Subcode if applicable, 1642 * @param errorSubcode the BGP NOTIFICATION Error Subcode if applicable,
1643 * otherwise BgpConstants.Notifications.ERROR_SUBCODE_UNSPECIFIC 1643 * otherwise BgpConstants.Notifications.ERROR_SUBCODE_UNSPECIFIC
1644 - * @param payload the BGP NOTIFICATION Data if applicable, otherwise null 1644 + * @param data the BGP NOTIFICATION Data if applicable, otherwise null
1645 * @return the message to transmit (BGP header included) 1645 * @return the message to transmit (BGP header included)
1646 */ 1646 */
1647 ChannelBuffer prepareBgpNotification(int errorCode, int errorSubcode, 1647 ChannelBuffer prepareBgpNotification(int errorCode, int errorSubcode,
......
...@@ -29,15 +29,17 @@ import com.google.common.base.MoreObjects; ...@@ -29,15 +29,17 @@ import com.google.common.base.MoreObjects;
29 29
30 /** 30 /**
31 * Represents a BGP daemon in SDN network. 31 * Represents a BGP daemon in SDN network.
32 - * <p/> 32 + * <p>
33 * Each BGP speaker has a attachment point, which includes a switch DPID and a 33 * Each BGP speaker has a attachment point, which includes a switch DPID and a
34 * switch port. Each BGP speaker has one MAC address and several IP addresses, 34 * switch port. Each BGP speaker has one MAC address and several IP addresses,
35 * which are used to peer with BGP peers outside the SDN network. For each 35 * which are used to peer with BGP peers outside the SDN network. For each
36 * peer outside the SDN network, we configure a different IP address to BGP 36 * peer outside the SDN network, we configure a different IP address to BGP
37 * speaker inside the SDN network. 37 * speaker inside the SDN network.
38 - * <p/> 38 + * </p>
39 + * <p>
39 * Each BGP speaker has a name, which is a unique identifying String that is 40 * Each BGP speaker has a name, which is a unique identifying String that is
40 * used to reference this speaker in the configuration. 41 * used to reference this speaker in the configuration.
42 + * </p>
41 */ 43 */
42 public class BgpSpeaker { 44 public class BgpSpeaker {
43 private final String name; 45 private final String name;
......
...@@ -28,8 +28,9 @@ import com.google.common.base.MoreObjects; ...@@ -28,8 +28,9 @@ import com.google.common.base.MoreObjects;
28 /** 28 /**
29 * Represents an address of a {@link BgpSpeaker} configured on an 29 * Represents an address of a {@link BgpSpeaker} configured on an
30 * {@link Interface}. 30 * {@link Interface}.
31 - * <p/> 31 + * <p>
32 * Each InterfaceAddress includes the interface name and an IP address. 32 * Each InterfaceAddress includes the interface name and an IP address.
33 + * </p>
33 */ 34 */
34 public class InterfaceAddress { 35 public class InterfaceAddress {
35 private final ConnectPoint connectPoint; 36 private final ConnectPoint connectPoint;
......
...@@ -27,14 +27,12 @@ import org.slf4j.LoggerFactory; ...@@ -27,14 +27,12 @@ import org.slf4j.LoggerFactory;
27 27
28 import com.fasterxml.jackson.databind.ObjectMapper; 28 import com.fasterxml.jackson.databind.ObjectMapper;
29 29
30 +// TODO: As a long term solution, a module providing general network configuration to ONOS nodes should be used.
31 +
30 /** 32 /**
31 - * SDN-IP Config Reader provides IConfigInfoService 33 + * SDN-IP Config Reader provides IConfigInfoService by reading from an
32 - * by reading from an SDN-IP configuration file. 34 + * SDN-IP configuration file. It must be enabled on the nodes within the cluster
33 - * It must be enabled on the nodes within the cluster
34 * not running SDN-IP. 35 * not running SDN-IP.
35 - * <p/>
36 - * TODO: As a long term solution, a module providing
37 - * general network configuration to ONOS nodes should be used.
38 */ 36 */
39 public class SdnIpConfigReader implements SdnIpConfigService { 37 public class SdnIpConfigReader implements SdnIpConfigService {
40 38
...@@ -85,7 +83,7 @@ public class SdnIpConfigReader implements SdnIpConfigService { ...@@ -85,7 +83,7 @@ public class SdnIpConfigReader implements SdnIpConfigService {
85 }*/ 83 }*/
86 } 84 }
87 85
88 - /** 86 + /*
89 * To find the Interface which has longest matchable IP prefix (sub-network 87 * To find the Interface which has longest matchable IP prefix (sub-network
90 * prefix) to next hop IP address. 88 * prefix) to next hop IP address.
91 * 89 *
......
...@@ -64,7 +64,7 @@ public class MastershipEvent extends AbstractEvent<MastershipEvent.Type, DeviceI ...@@ -64,7 +64,7 @@ public class MastershipEvent extends AbstractEvent<MastershipEvent.Type, DeviceI
64 * 64 *
65 * @param type mastership event type 65 * @param type mastership event type
66 * @param device event device subject 66 * @param device event device subject
67 - * @param master master ID subject 67 + * @param info role information
68 * @param time occurrence time 68 * @param time occurrence time
69 */ 69 */
70 public MastershipEvent(Type type, DeviceId device, RoleInfo info, long time) { 70 public MastershipEvent(Type type, DeviceId device, RoleInfo info, long time) {
......
...@@ -25,8 +25,9 @@ public interface SparseAnnotations extends Annotations { ...@@ -25,8 +25,9 @@ public interface SparseAnnotations extends Annotations {
25 25
26 /** 26 /**
27 * {@inheritDoc} 27 * {@inheritDoc}
28 - * <p/> 28 + * <p>
29 * Note that this set includes keys for any attributes tagged for removal. 29 * Note that this set includes keys for any attributes tagged for removal.
30 + * </p>
30 */ 31 */
31 @Override 32 @Override
32 public Set<String> keys(); 33 public Set<String> keys();
......
...@@ -46,7 +46,6 @@ public interface DeviceProviderService extends ProviderService<DeviceProvider> { ...@@ -46,7 +46,6 @@ public interface DeviceProviderService extends ProviderService<DeviceProvider> {
46 /** 46 /**
47 * Sends information about all ports of a device. It is up to the core to 47 * Sends information about all ports of a device. It is up to the core to
48 * determine what has changed. 48 * determine what has changed.
49 - * <p/>
50 * 49 *
51 * @param deviceId identity of the device 50 * @param deviceId identity of the device
52 * @param portDescriptions list of device ports 51 * @param portDescriptions list of device ports
......
...@@ -97,7 +97,7 @@ public final class DefaultTrafficTreatment implements TrafficTreatment { ...@@ -97,7 +97,7 @@ public final class DefaultTrafficTreatment implements TrafficTreatment {
97 97
98 /** 98 /**
99 * Builds a list of treatments following the following order. 99 * Builds a list of treatments following the following order.
100 - * Modifications -> Group -> Output (including drop) 100 + * Modifications -&gt; Group -&gt; Output (including drop)
101 */ 101 */
102 public static final class Builder implements TrafficTreatment.Builder { 102 public static final class Builder implements TrafficTreatment.Builder {
103 103
......
...@@ -27,7 +27,7 @@ public interface FlowRuleProviderService extends ProviderService<FlowRuleProvide ...@@ -27,7 +27,7 @@ public interface FlowRuleProviderService extends ProviderService<FlowRuleProvide
27 /** 27 /**
28 * Signals that a flow rule that was previously installed has been removed. 28 * Signals that a flow rule that was previously installed has been removed.
29 * 29 *
30 - * @param flowRule information about the removed flow 30 + * @param flowEntry removed flow entry
31 */ 31 */
32 void flowRemoved(FlowEntry flowEntry); 32 void flowRemoved(FlowEntry flowEntry);
33 33
...@@ -35,10 +35,8 @@ public interface FlowRuleProviderService extends ProviderService<FlowRuleProvide ...@@ -35,10 +35,8 @@ public interface FlowRuleProviderService extends ProviderService<FlowRuleProvide
35 * Pushes the collection of flow entries currently applied on the given 35 * Pushes the collection of flow entries currently applied on the given
36 * device. 36 * device.
37 * 37 *
38 - * @param flowRules collection of flow rules 38 + * @param flowEntries collection of flow rules
39 */ 39 */
40 void pushFlowMetrics(DeviceId deviceId, Iterable<FlowEntry> flowEntries); 40 void pushFlowMetrics(DeviceId deviceId, Iterable<FlowEntry> flowEntries);
41 41
42 -
43 -
44 } 42 }
......
...@@ -49,7 +49,7 @@ public interface FlowRuleStore extends Store<FlowRuleBatchEvent, FlowRuleStoreDe ...@@ -49,7 +49,7 @@ public interface FlowRuleStore extends Store<FlowRuleBatchEvent, FlowRuleStoreDe
49 Iterable<FlowEntry> getFlowEntries(DeviceId deviceId); 49 Iterable<FlowEntry> getFlowEntries(DeviceId deviceId);
50 50
51 /** 51 /**
52 - // TODO: Better description of method behavior. 52 + * // TODO: Better description of method behavior.
53 * Stores a new flow rule without generating events. 53 * Stores a new flow rule without generating events.
54 * 54 *
55 * @param rule the flow rule to add 55 * @param rule the flow rule to add
...@@ -58,6 +58,7 @@ public interface FlowRuleStore extends Store<FlowRuleBatchEvent, FlowRuleStoreDe ...@@ -58,6 +58,7 @@ public interface FlowRuleStore extends Store<FlowRuleBatchEvent, FlowRuleStoreDe
58 58
59 /** 59 /**
60 * Stores a batch of flow rules. 60 * Stores a batch of flow rules.
61 + *
61 * @param batchOperation batch of flow rules. 62 * @param batchOperation batch of flow rules.
62 * @return Future response indicating success/failure of the batch operation 63 * @return Future response indicating success/failure of the batch operation
63 * all the way down to the device. 64 * all the way down to the device.
...@@ -66,7 +67,8 @@ public interface FlowRuleStore extends Store<FlowRuleBatchEvent, FlowRuleStoreDe ...@@ -66,7 +67,8 @@ public interface FlowRuleStore extends Store<FlowRuleBatchEvent, FlowRuleStoreDe
66 67
67 /** 68 /**
68 * Invoked on the completion of a storeBatch operation. 69 * Invoked on the completion of a storeBatch operation.
69 - * @param result 70 + *
71 + * @param event flow rule batch event
70 */ 72 */
71 void batchOperationComplete(FlowRuleBatchEvent event); 73 void batchOperationComplete(FlowRuleBatchEvent event);
72 74
...@@ -75,7 +77,6 @@ public interface FlowRuleStore extends Store<FlowRuleBatchEvent, FlowRuleStoreDe ...@@ -75,7 +77,6 @@ public interface FlowRuleStore extends Store<FlowRuleBatchEvent, FlowRuleStoreDe
75 * when the provider indicates that the flow has been removed. 77 * when the provider indicates that the flow has been removed.
76 * 78 *
77 * @param rule the flow rule to delete 79 * @param rule the flow rule to delete
78 - * @return true if the rule should be handled locally
79 */ 80 */
80 void deleteFlowRule(FlowRule rule); 81 void deleteFlowRule(FlowRule rule);
81 82
......
...@@ -32,12 +32,13 @@ public interface HostAdminService { ...@@ -32,12 +32,13 @@ public interface HostAdminService {
32 32
33 /** 33 /**
34 * Binds IP and MAC addresses to the given connection point. 34 * Binds IP and MAC addresses to the given connection point.
35 - * <p/> 35 + * <p>
36 * The addresses are added to the set of addresses already bound to the 36 * The addresses are added to the set of addresses already bound to the
37 * connection point. If any of the fields in addresses is null, no change 37 * connection point. If any of the fields in addresses is null, no change
38 * is made to the corresponding addresses in the store. 38 * is made to the corresponding addresses in the store.
39 * {@link #unbindAddressesFromPort(PortAddresses)} must be use to unbind 39 * {@link #unbindAddressesFromPort(PortAddresses)} must be use to unbind
40 * addresses that have previously been bound. 40 * addresses that have previously been bound.
41 + * </p>
41 * 42 *
42 * @param addresses address object containing addresses to add and the port 43 * @param addresses address object containing addresses to add and the port
43 * to add them to 44 * to add them to
......
...@@ -114,9 +114,7 @@ public interface HostService { ...@@ -114,9 +114,7 @@ public interface HostService {
114 114
115 /** 115 /**
116 * Requests the host service to resolve the MAC address for the given IP 116 * Requests the host service to resolve the MAC address for the given IP
117 - * address. 117 + * address. This will trigger a notification to the host listeners if the MAC
118 - * <p/>
119 - * This will trigger a notification to the host listeners if the MAC
120 * address is found. 118 * address is found.
121 * 119 *
122 * @param ip IP address to find the MAC address for 120 * @param ip IP address to find the MAC address for
...@@ -134,8 +132,7 @@ public interface HostService { ...@@ -134,8 +132,7 @@ public interface HostService {
134 * Retrieves the addresses that have been bound to the given connection 132 * Retrieves the addresses that have been bound to the given connection
135 * point. 133 * point.
136 * 134 *
137 - * @param connectPoint the connection point to retrieve address bindings 135 + * @param connectPoint the connection point to retrieve address bindings for
138 - * for
139 * @return addresses bound to the port 136 * @return addresses bound to the port
140 */ 137 */
141 PortAddresses getAddressBindingsForPort(ConnectPoint connectPoint); 138 PortAddresses getAddressBindingsForPort(ConnectPoint connectPoint);
......
...@@ -36,9 +36,8 @@ public class PortAddresses { ...@@ -36,9 +36,8 @@ public class PortAddresses {
36 36
37 /** 37 /**
38 * Constructs a PortAddresses object for the given connection point, with a 38 * Constructs a PortAddresses object for the given connection point, with a
39 - * set of IP addresses and a MAC address. 39 + * set of IP addresses and a MAC address. Both address parameters are
40 - * <p/> 40 + * optional and can be set to null.
41 - * Both address parameters are optional and can be set to null.
42 * 41 *
43 * @param connectPoint the connection point these addresses are for 42 * @param connectPoint the connection point these addresses are for
44 * @param ipAddresses a set of interface IP addresses 43 * @param ipAddresses a set of interface IP addresses
......
...@@ -26,8 +26,9 @@ import static com.google.common.base.Preconditions.checkNotNull; ...@@ -26,8 +26,9 @@ import static com.google.common.base.Preconditions.checkNotNull;
26 26
27 /** 27 /**
28 * Abstraction of an application level intent. 28 * Abstraction of an application level intent.
29 - * <p/> 29 + * <p>
30 * Make sure that an Intent should be immutable when a new type is defined. 30 * Make sure that an Intent should be immutable when a new type is defined.
31 + * </p>
31 */ 32 */
32 public abstract class Intent implements BatchOperationTarget { 33 public abstract class Intent implements BatchOperationTarget {
33 34
......
...@@ -19,8 +19,7 @@ import org.onlab.onos.net.flow.BatchOperationTarget; ...@@ -19,8 +19,7 @@ import org.onlab.onos.net.flow.BatchOperationTarget;
19 19
20 /** 20 /**
21 * Intent identifier suitable as an external key. 21 * Intent identifier suitable as an external key.
22 - * <p/> 22 + * <p>This class is immutable.</p>
23 - * This class is immutable.
24 */ 23 */
25 public final class IntentId implements BatchOperationTarget { 24 public final class IntentId implements BatchOperationTarget {
26 25
......
...@@ -25,20 +25,20 @@ import java.util.concurrent.Future; ...@@ -25,20 +25,20 @@ import java.util.concurrent.Future;
25 public interface IntentService { 25 public interface IntentService {
26 /** 26 /**
27 * Submits an intent into the system. 27 * Submits an intent into the system.
28 - * <p/> 28 + * <p>
29 * This is an asynchronous request meaning that any compiling or 29 * This is an asynchronous request meaning that any compiling or
30 * installation activities may be done at later time. 30 * installation activities may be done at later time.
31 - * 31 + * </p>
32 * @param intent intent to be submitted 32 * @param intent intent to be submitted
33 */ 33 */
34 void submit(Intent intent); 34 void submit(Intent intent);
35 35
36 /** 36 /**
37 * Withdraws an intent from the system. 37 * Withdraws an intent from the system.
38 - * <p/> 38 + * <p>
39 * This is an asynchronous request meaning that the environment may be 39 * This is an asynchronous request meaning that the environment may be
40 * affected at later time. 40 * affected at later time.
41 - * 41 + * </p>
42 * @param intent intent to be withdrawn 42 * @param intent intent to be withdrawn
43 */ 43 */
44 void withdraw(Intent intent); 44 void withdraw(Intent intent);
...@@ -54,10 +54,10 @@ public interface IntentService { ...@@ -54,10 +54,10 @@ public interface IntentService {
54 /** 54 /**
55 * Submits a batch of submit &amp; withdraw operations. Such a batch is 55 * Submits a batch of submit &amp; withdraw operations. Such a batch is
56 * assumed to be processed together. 56 * assumed to be processed together.
57 - * <p/> 57 + * <p>
58 * This is an asynchronous request meaning that the environment may be 58 * This is an asynchronous request meaning that the environment may be
59 * affected at later time. 59 * affected at later time.
60 - * 60 + * </p>
61 * @param operations batch of intent operations 61 * @param operations batch of intent operations
62 */ 62 */
63 Future<IntentOperations> execute(IntentOperations operations); 63 Future<IntentOperations> execute(IntentOperations operations);
......
...@@ -24,8 +24,9 @@ public enum IntentState { ...@@ -24,8 +24,9 @@ public enum IntentState {
24 * Signifies that the intent has been submitted and will start compiling 24 * Signifies that the intent has been submitted and will start compiling
25 * shortly. However, this compilation may not necessarily occur on the 25 * shortly. However, this compilation may not necessarily occur on the
26 * local controller instance. 26 * local controller instance.
27 - * <p/> 27 + * <p>
28 * All intent in the runtime take this state first. 28 * All intent in the runtime take this state first.
29 + * </p>
29 */ 30 */
30 SUBMITTED, 31 SUBMITTED,
31 32
...@@ -57,10 +58,11 @@ public enum IntentState { ...@@ -57,10 +58,11 @@ public enum IntentState {
57 * as an attempt to adapt to an anomaly in the network environment. 58 * as an attempt to adapt to an anomaly in the network environment.
58 * This is a transitional state after which the intent will enter either 59 * This is a transitional state after which the intent will enter either
59 * {@link #FAILED} state or {@link #INSTALLING} state. 60 * {@link #FAILED} state or {@link #INSTALLING} state.
60 - * <p/> 61 + * <p>
61 * Exit to the {@link #FAILED} state may be caused by failure to compile 62 * Exit to the {@link #FAILED} state may be caused by failure to compile
62 * or by compiling into the same set of installable intents which have 63 * or by compiling into the same set of installable intents which have
63 * previously failed to be installed. 64 * previously failed to be installed.
65 + * </p>
64 */ 66 */
65 RECOMPILING, 67 RECOMPILING,
66 68
......
...@@ -28,11 +28,12 @@ public class OpticalConnectivityIntent extends Intent { ...@@ -28,11 +28,12 @@ public class OpticalConnectivityIntent extends Intent {
28 protected ConnectPoint dst; 28 protected ConnectPoint dst;
29 29
30 /** 30 /**
31 - * Constructor. 31 + * Creates an optical connectivity intent between the specified
32 + * connection points.
32 * 33 *
33 - * @param id ID for this new Intent object. 34 + * @param appId application identification
34 - * @param src The source transponder port. 35 + * @param src the source transponder port
35 - * @param dst The destination transponder port. 36 + * @param dst the destination transponder port
36 */ 37 */
37 public OpticalConnectivityIntent(ApplicationId appId, ConnectPoint src, ConnectPoint dst) { 38 public OpticalConnectivityIntent(ApplicationId appId, ConnectPoint src, ConnectPoint dst) {
38 super(id(OpticalConnectivityIntent.class, src, dst), 39 super(id(OpticalConnectivityIntent.class, src, dst),
...@@ -51,18 +52,18 @@ public class OpticalConnectivityIntent extends Intent { ...@@ -51,18 +52,18 @@ public class OpticalConnectivityIntent extends Intent {
51 } 52 }
52 53
53 /** 54 /**
54 - * Gets source transponder port. 55 + * Returns the source transponder port.
55 * 56 *
56 - * @return The source transponder port. 57 + * @return source transponder port
57 */ 58 */
58 public ConnectPoint getSrcConnectPoint() { 59 public ConnectPoint getSrcConnectPoint() {
59 return src; 60 return src;
60 } 61 }
61 62
62 /** 63 /**
63 - * Gets destination transponder port. 64 + * Returns the destination transponder port.
64 * 65 *
65 - * @return The source transponder port. 66 + * @return source transponder port
66 */ 67 */
67 public ConnectPoint getDst() { 68 public ConnectPoint getDst() {
68 return dst; 69 return dst;
......
...@@ -20,23 +20,26 @@ ...@@ -20,23 +20,26 @@
20 * <em>what</em> rather than the <em>how</em>. This makes such instructions 20 * <em>what</em> rather than the <em>how</em>. This makes such instructions
21 * largely independent of topology and device specifics, thus allowing them to 21 * largely independent of topology and device specifics, thus allowing them to
22 * survive topology mutations. 22 * survive topology mutations.
23 - * <p/> 23 + * <p>
24 * The controller core provides a suite of built-in intents and their compilers 24 * The controller core provides a suite of built-in intents and their compilers
25 * and installers. However, the intent framework is extensible in that it allows 25 * and installers. However, the intent framework is extensible in that it allows
26 * additional intents and their compilers or installers to be added 26 * additional intents and their compilers or installers to be added
27 * dynamically at run-time. This allows others to enhance the initial arsenal of 27 * dynamically at run-time. This allows others to enhance the initial arsenal of
28 * connectivity and policy-based intents available in base controller software. 28 * connectivity and policy-based intents available in base controller software.
29 - * <p/> 29 + * </p>
30 + * <p>
30 * The following diagram depicts the state transition diagram for each top-level intent:<br> 31 * The following diagram depicts the state transition diagram for each top-level intent:<br>
31 * <img src="doc-files/intent-states.png" alt="ONOS intent states"> 32 * <img src="doc-files/intent-states.png" alt="ONOS intent states">
32 - * <p/> 33 + * </p>
34 + * <p>
33 * The controller core accepts the intent specifications and translates them, via a 35 * The controller core accepts the intent specifications and translates them, via a
34 * process referred to as intent compilation, to installable intents, which are 36 * process referred to as intent compilation, to installable intents, which are
35 * essentially actionable operations on the network environment. 37 * essentially actionable operations on the network environment.
36 * These actions are carried out by intent installation process, which results 38 * These actions are carried out by intent installation process, which results
37 * in some changes to the environment, e.g. tunnel links being provisioned, 39 * in some changes to the environment, e.g. tunnel links being provisioned,
38 * flow rules being installed on the data-plane, optical lambdas being reserved. 40 * flow rules being installed on the data-plane, optical lambdas being reserved.
39 - * <p/> 41 + * </p>
42 + * <p>
40 * After an intent is submitted by an application, it will be sent immediately 43 * After an intent is submitted by an application, it will be sent immediately
41 * (but asynchronously) into a compiling phase, then to installing phase and if 44 * (but asynchronously) into a compiling phase, then to installing phase and if
42 * all goes according to plan into installed state. Once an application decides 45 * all goes according to plan into installed state. Once an application decides
...@@ -48,7 +51,8 @@ ...@@ -48,7 +51,8 @@
48 * installable intents and instead result in a failed compile. If this occurs, 51 * installable intents and instead result in a failed compile. If this occurs,
49 * only a change in the environment can trigger a transition back to the 52 * only a change in the environment can trigger a transition back to the
50 * compiling state. 53 * compiling state.
51 - * <p/> 54 + * </p>
55 + * <p>
52 * Similarly, an issue may be encountered during the installation phase in 56 * Similarly, an issue may be encountered during the installation phase in
53 * which case the framework will attempt to recompile the intent to see if an 57 * which case the framework will attempt to recompile the intent to see if an
54 * alternate approach is available. If so, the intent will be sent back to 58 * alternate approach is available. If so, the intent will be sent back to
...@@ -61,12 +65,14 @@ ...@@ -61,12 +65,14 @@
61 * the intent, and if an alternate approach is available, its installation 65 * the intent, and if an alternate approach is available, its installation
62 * will be attempted. Otherwise, the original top-level intent will be parked 66 * will be attempted. Otherwise, the original top-level intent will be parked
63 * in the failed state. 67 * in the failed state.
64 - * <p/> 68 + * </p>
69 + * <p>
65 * Please note that all *ing states, depicted in orange, are transitional and 70 * Please note that all *ing states, depicted in orange, are transitional and
66 * are expected to last only a brief amount of time. The rest of the states 71 * are expected to last only a brief amount of time. The rest of the states
67 * are parking states where the intent may spent some time; except for the 72 * are parking states where the intent may spent some time; except for the
68 * submitted state of course. There, the intent may pause, but only briefly, 73 * submitted state of course. There, the intent may pause, but only briefly,
69 * while the system determines where to perform the compilation or while it 74 * while the system determines where to perform the compilation or while it
70 * performs global recomputation/optimization across all prior intents. 75 * performs global recomputation/optimization across all prior intents.
76 + * </p>
71 */ 77 */
72 package org.onlab.onos.net.intent; 78 package org.onlab.onos.net.intent;
......
...@@ -24,14 +24,16 @@ import static com.google.common.base.Preconditions.checkNotNull; ...@@ -24,14 +24,16 @@ import static com.google.common.base.Preconditions.checkNotNull;
24 * External identity of a {@link org.onlab.onos.net.provider.Provider} family. 24 * External identity of a {@link org.onlab.onos.net.provider.Provider} family.
25 * It also carriers two designations of external characteristics, the URI 25 * It also carriers two designations of external characteristics, the URI
26 * scheme and primary/ancillary indicator. 26 * scheme and primary/ancillary indicator.
27 - * <p/> 27 + * <p>
28 * The device URI scheme is used to determine applicability of a provider to 28 * The device URI scheme is used to determine applicability of a provider to
29 * operations on a specific device. The ancillary indicator serves to designate 29 * operations on a specific device. The ancillary indicator serves to designate
30 * a provider as a primary or ancillary. 30 * a provider as a primary or ancillary.
31 - * 31 + * </p>
32 + * <p>
32 * A {@link org.onlab.onos.net.provider.ProviderRegistry} uses this designation 33 * A {@link org.onlab.onos.net.provider.ProviderRegistry} uses this designation
33 * to permit only one primary provider per device URI scheme. Multiple 34 * to permit only one primary provider per device URI scheme. Multiple
34 * ancillary providers can register with the same device URI scheme however. 35 * ancillary providers can register with the same device URI scheme however.
36 + * </p>
35 */ 37 */
36 public class ProviderId { 38 public class ProviderId {
37 39
......
...@@ -38,9 +38,10 @@ public interface ProviderRegistry<P extends Provider, S extends ProviderService< ...@@ -38,9 +38,10 @@ public interface ProviderRegistry<P extends Provider, S extends ProviderService<
38 * Unregisters the supplied provider. As a result the previously issued 38 * Unregisters the supplied provider. As a result the previously issued
39 * provider service will be invalidated and any subsequent invocations 39 * provider service will be invalidated and any subsequent invocations
40 * of its methods may throw {@link java.lang.IllegalStateException}. 40 * of its methods may throw {@link java.lang.IllegalStateException}.
41 - * <p/> 41 + * <p>
42 * Unregistering a provider that has not been previously registered results 42 * Unregistering a provider that has not been previously registered results
43 * in a no-op. 43 * in a no-op.
44 + * </p>
44 * 45 *
45 * @param provider provider to be unregistered 46 * @param provider provider to be unregistered
46 */ 47 */
......
...@@ -51,10 +51,11 @@ import org.onlab.util.Timer; ...@@ -51,10 +51,11 @@ import org.onlab.util.Timer;
51 51
52 /** 52 /**
53 * Monitors hosts on the dataplane to detect changes in host data. 53 * Monitors hosts on the dataplane to detect changes in host data.
54 - * <p/> 54 + * <p>
55 * The HostMonitor can monitor hosts that have already been detected for 55 * The HostMonitor can monitor hosts that have already been detected for
56 * changes. At an application's request, it can also monitor and actively 56 * changes. At an application's request, it can also monitor and actively
57 * probe for hosts that have not yet been detected (specified by IP address). 57 * probe for hosts that have not yet been detected (specified by IP address).
58 + * </p>
58 */ 59 */
59 public class HostMonitor implements TimerTask { 60 public class HostMonitor implements TimerTask {
60 private DeviceService deviceService; 61 private DeviceService deviceService;
......
...@@ -49,8 +49,8 @@ import com.hazelcast.query.Predicate; ...@@ -49,8 +49,8 @@ import com.hazelcast.query.Predicate;
49 49
50 // TODO: implement Predicate, etc. if we need them. 50 // TODO: implement Predicate, etc. if we need them.
51 /** 51 /**
52 - * Wrapper around IMap<byte[], byte[]> which serializes/deserializes 52 + * Wrapper around IMap&lt;byte[], byte[]&gt; which serializes/deserializes
53 - * Key and Value using StoreSerializer. 53 + * key and value using StoreSerializer.
54 * 54 *
55 * @param <K> key type 55 * @param <K> key type
56 * @param <V> value type 56 * @param <V> value type
......
...@@ -71,7 +71,7 @@ public interface OpenFlowSwitchDriver extends OpenFlowSwitch { ...@@ -71,7 +71,7 @@ public interface OpenFlowSwitchDriver extends OpenFlowSwitch {
71 public void handleNiciraRole(OFMessage m) throws SwitchStateException; 71 public void handleNiciraRole(OFMessage m) throws SwitchStateException;
72 72
73 /** 73 /**
74 - * Handle OF 1.x (where x > 0) role messages. 74 + * Handle OF 1.x (where x &gt; 0) role messages.
75 * @param m the role message to handle 75 * @param m the role message to handle
76 * @throws SwitchStateException if the message received was 76 * @throws SwitchStateException if the message received was
77 * not a nicira role or was malformed. 77 * not a nicira role or was malformed.
......
...@@ -747,8 +747,8 @@ class OFChannelHandler extends IdleStateAwareChannelHandler { ...@@ -747,8 +747,8 @@ class OFChannelHandler extends IdleStateAwareChannelHandler {
747 * the changes to ports will already be visible once the switch is 747 * the changes to ports will already be visible once the switch is
748 * activated. As a result, no notifications are sent out for these 748 * activated. As a result, no notifications are sent out for these
749 * pending portStatus messages. 749 * pending portStatus messages.
750 - * @param h 750 + *
751 - * @throws SwitchStateException 751 + * @param h the channel handler that received the message
752 */ 752 */
753 protected void handlePendingPortStatusMessages(OFChannelHandler h) { 753 protected void handlePendingPortStatusMessages(OFChannelHandler h) {
754 try { 754 try {
......
...@@ -52,15 +52,14 @@ import org.onlab.packet.ONOSLLDP; ...@@ -52,15 +52,14 @@ import org.onlab.packet.ONOSLLDP;
52 import org.onlab.util.Timer; 52 import org.onlab.util.Timer;
53 import org.slf4j.Logger; 53 import org.slf4j.Logger;
54 54
55 +// TODO: add 'fast discovery' mode: drop LLDPs in destination switch but listen for flow_removed messages
56 +
55 /** 57 /**
56 * Run discovery process from a physical switch. Ports are initially labeled as 58 * Run discovery process from a physical switch. Ports are initially labeled as
57 * slow ports. When an LLDP is successfully received, label the remote port as 59 * slow ports. When an LLDP is successfully received, label the remote port as
58 * fast. Every probeRate milliseconds, loop over all fast ports and send an 60 * fast. Every probeRate milliseconds, loop over all fast ports and send an
59 * LLDP, send an LLDP for a single slow port. Based on FlowVisor topology 61 * LLDP, send an LLDP for a single slow port. Based on FlowVisor topology
60 * discovery implementation. 62 * discovery implementation.
61 - * <p/>
62 - * TODO: add 'fast discovery' mode: drop LLDPs in destination switch but listen
63 - * for flow_removed messages
64 */ 63 */
65 public class LinkDiscovery implements TimerTask { 64 public class LinkDiscovery implements TimerTask {
66 65
......
...@@ -62,9 +62,6 @@ import org.slf4j.Logger; ...@@ -62,9 +62,6 @@ import org.slf4j.Logger;
62 * fast. Every probeRate milliseconds, loop over all fast ports and send an 62 * fast. Every probeRate milliseconds, loop over all fast ports and send an
63 * LLDP, send an LLDP for a single slow port. Based on FlowVisor topology 63 * LLDP, send an LLDP for a single slow port. Based on FlowVisor topology
64 * discovery implementation. 64 * discovery implementation.
65 - *
66 - * TODO: add 'fast discovery' mode: drop LLDPs in destination switch but listen
67 - * for flow_removed messages
68 */ 65 */
69 @Deprecated 66 @Deprecated
70 public class LinkDiscovery implements TimerTask { 67 public class LinkDiscovery implements TimerTask {
...@@ -331,7 +328,6 @@ public class LinkDiscovery implements TimerTask { ...@@ -331,7 +328,6 @@ public class LinkDiscovery implements TimerTask {
331 * port. 328 * port.
332 * 329 *
333 * @param t timeout 330 * @param t timeout
334 - * @throws Exception
335 */ 331 */
336 @Override 332 @Override
337 public void run(final Timeout t) { 333 public void run(final Timeout t) {
......
...@@ -6,4 +6,4 @@ ...@@ -6,4 +6,4 @@
6 export JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-7-openjdk-amd64/} 6 export JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-7-openjdk-amd64/}
7 7
8 cd $(dirname $0)/../apache-karaf-$KARAF_VERSION/bin 8 cd $(dirname $0)/../apache-karaf-$KARAF_VERSION/bin
9 -./client -h localhost "$@" 9 +./client -h localhost -u karaf "$@"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
4 # ----------------------------------------------------------------------------- 4 # -----------------------------------------------------------------------------
5 5
6 export JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-7-openjdk-amd64/} 6 export JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-7-openjdk-amd64/}
7 -export JAVA_OPTS="-Xms256M -Xmx2048M" 7 +export JAVA_OPTS="${JAVA_OPTS:--Xms256M -Xmx2048M}"
8 8
9 cd /opt/onos 9 cd /opt/onos
10 /opt/onos/apache-karaf-$KARAF_VERSION/bin/karaf "$@" 10 /opt/onos/apache-karaf-$KARAF_VERSION/bin/karaf "$@"
......
...@@ -12,6 +12,7 @@ respawn ...@@ -12,6 +12,7 @@ respawn
12 12
13 env LANG=en_US.UTF-8 13 env LANG=en_US.UTF-8
14 env JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 14 env JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
15 +env NEW_JAVA_HOME=/usr/lib/jvm/java-8-oracle/
15 16
16 pre-stop script 17 pre-stop script
17 /opt/onos/bin/onos halt 2>/opt/onos/var/stderr.log 18 /opt/onos/bin/onos halt 2>/opt/onos/var/stderr.log
......
...@@ -9,4 +9,4 @@ ...@@ -9,4 +9,4 @@
9 [ "$1" = "-w" ] && shift && onos-wait-for-start $1 9 [ "$1" = "-w" ] && shift && onos-wait-for-start $1
10 10
11 [ -n "$1" ] && OCI=$1 && shift 11 [ -n "$1" ] && OCI=$1 && shift
12 -client -h $OCI "$@" 2>/dev/null 12 +client -h $OCI -u karaf "$@" 2>/dev/null
......
...@@ -76,10 +76,10 @@ public final class IpAddress implements Comparable<IpAddress> { ...@@ -76,10 +76,10 @@ public final class IpAddress implements Comparable<IpAddress> {
76 /** 76 /**
77 * Converts a byte array and a given offset from the beginning of the 77 * Converts a byte array and a given offset from the beginning of the
78 * array into an IP address. 78 * array into an IP address.
79 - * <p/> 79 + * <p>
80 * The IP address is stored in network byte order (i.e., the most 80 * The IP address is stored in network byte order (i.e., the most
81 * significant byte first). 81 * significant byte first).
82 - * 82 + * </p>
83 * @param value the value to use 83 * @param value the value to use
84 * @param offset the offset in bytes from the beginning of the byte array 84 * @param offset the offset in bytes from the beginning of the byte array
85 * @return an IP address 85 * @return an IP address
......
...@@ -17,13 +17,15 @@ package org.onlab.packet; ...@@ -17,13 +17,15 @@ package org.onlab.packet;
17 17
18 import java.util.Objects; 18 import java.util.Objects;
19 19
20 +// TODO: Add support for IPv6 as well.
21 +
20 /** 22 /**
21 - * A class representing an IP prefix. 23 + * A class representing an IP prefix. A prefix consists of an IP address and
22 - * TODO: Add support for IPv6 as well. 24 + * a subnet mask.
23 - * <p/> 25 + * <p>
24 - * A prefix consists of an IP address and a subnet mask.
25 * NOTE: The stored IP address in the result IP prefix is masked to 26 * NOTE: The stored IP address in the result IP prefix is masked to
26 * contain zeroes in all bits after the prefix length. 27 * contain zeroes in all bits after the prefix length.
28 + * </p>
27 */ 29 */
28 public final class IpPrefix { 30 public final class IpPrefix {
29 // Maximum network mask length 31 // Maximum network mask length
...@@ -97,7 +99,7 @@ public final class IpPrefix { ...@@ -97,7 +99,7 @@ public final class IpPrefix {
97 * Converts a CIDR (slash) notation string (e.g., "10.1.0.0/16") into an 99 * Converts a CIDR (slash) notation string (e.g., "10.1.0.0/16") into an
98 * IP prefix. 100 * IP prefix.
99 * 101 *
100 - * @param value an IP prefix in string form, e.g. "10.1.0.0/16" 102 + * @param address an IP prefix in string form, e.g. "10.1.0.0/16"
101 * @return an IP prefix 103 * @return an IP prefix
102 */ 104 */
103 public static IpPrefix valueOf(String address) { 105 public static IpPrefix valueOf(String address) {
......
...@@ -24,8 +24,8 @@ import org.apache.commons.lang3.concurrent.ConcurrentInitializer; ...@@ -24,8 +24,8 @@ import org.apache.commons.lang3.concurrent.ConcurrentInitializer;
24 * Creates an instance of new ConcurrentHashMap on each {@link #get()} call. 24 * Creates an instance of new ConcurrentHashMap on each {@link #get()} call.
25 * <p> 25 * <p>
26 * To be used with 26 * To be used with
27 - * {@link org.apache.commons.lang3.concurrent.ConcurrentUtils#createIfAbsent() 27 + * {@link org.apache.commons.lang3.concurrent.ConcurrentUtils#createIfAbsent}
28 - * ConcurrentUtils#createIfAbsent} 28 + * </p>
29 * 29 *
30 * @param <K> ConcurrentHashMap key type 30 * @param <K> ConcurrentHashMap key type
31 * @param <V> ConcurrentHashMap value type 31 * @param <V> ConcurrentHashMap value type
......
...@@ -24,8 +24,9 @@ public interface MessageHandler { ...@@ -24,8 +24,9 @@ public interface MessageHandler {
24 24
25 /** 25 /**
26 * Handles the message. 26 * Handles the message.
27 + *
27 * @param message message. 28 * @param message message.
28 - * @throws IOException. 29 + * @throws IOException if an error is encountered handling the message
29 */ 30 */
30 public void handle(Message message) throws IOException; 31 public void handle(Message message) throws IOException;
31 } 32 }
......
...@@ -318,10 +318,10 @@ public abstract class MessageStream<M extends Message> { ...@@ -318,10 +318,10 @@ public abstract class MessageStream<M extends Message> {
318 * Attempts to flush data, internal stream state and channel availability 318 * Attempts to flush data, internal stream state and channel availability
319 * permitting. Invoked by the driver I/O loop during handling of writable 319 * permitting. Invoked by the driver I/O loop during handling of writable
320 * selection key. 320 * selection key.
321 - * <p/> 321 + * <p>
322 * Resets the internal state flags {@code writeOccurred} and 322 * Resets the internal state flags {@code writeOccurred} and
323 * {@code writePending}. 323 * {@code writePending}.
324 - * 324 + * </p>
325 * @throws IOException if implicit flush failed 325 * @throws IOException if implicit flush failed
326 */ 326 */
327 void flushIfPossible() throws IOException { 327 void flushIfPossible() throws IOException {
......