tom

More documentation clean-up.

package org.onlab.onos.event;
/**
* Abstraction of a mechanism capable of accepting and dispatching events.
* Whether the events are accepted and the dispatched synchronously or
* asynchronously is unspecified.
* Abstraction of a mechanism capable of accepting and dispatching events to
* appropriate event sinks. Where the event sinks are obtained is unspecified.
* Similarly, whether the events are accepted and dispatched synchronously
* or asynchronously is unspecified as well.
*/
public interface EventDispatcher<E extends Event> {
......
......@@ -3,14 +3,63 @@ package org.onlab.onos.net;
import org.onlab.onos.net.provider.Provided;
/**
* Representation of an network infrastructure device.
* Representation of a network infrastructure device.
*/
public interface Device extends Provided {
// type, e.g. switch, router, firewall, ips, controller
/**
* Coarse classification of the type of the infrastructure device.
*/
public enum Type {
SWITCH, ROUTER, FIREWALL, BALANCER, IPS, IDS, CONTROLLER, OTHER
}
// id (uri within)
/**
* Returns the device identifier.
*
* @return device id
*/
DeviceId id();
// ports
/**
* Returns the type of the infrastructure device.
*
* @return type of the device
*/
Type type();
/**
* Returns the device manufacturer name.
*
* @return manufacturer name
*/
String manufacturer();
/**
* Returns the device hardware version.
*
* @return hardware version
*/
String hwVersion();
/**
* Returns the device software version.
*
* @return software version
*/
String swVersion();
/**
* Returns the device serial number.
*
* @return serial number
*/
String serialNumber();
// Device realizedBy(); ?
// ports are not provided directly, but rather via DeviceService.getPorts(Device device);
// Set<Behavior> behaviours(); // set of supported behaviours
}
......
......@@ -5,7 +5,24 @@ import org.onlab.onos.net.provider.Provided;
/**
* Abstraction of a network infrastructure link.
*/
public interface Link extends Provided { // TODO: Also should extend graph Edge
public interface Link extends Provided { // TODO: Also should extend graph Edge once the graph module is checked in
/**
* Coarse representation of the link type.
*/
public enum Type {
/**
* Signifies that this is a direct single-segment link.
*/
DIRECT,
/**
* Signifies that this link is potentially comprised from multiple
* underlying segments or hops, e.g. optical links, tunnel links,
* multi-hop links spanning 'dark' switches
*/
INDIRECT
}
/**
* Returns the link source connection point.
......@@ -21,4 +38,6 @@ public interface Link extends Provided { // TODO: Also should extend graph Edge
*/
ConnectPoint dst();
// LinkInfo info(); // Additional link information / decorations
}
......
package org.onlab.onos.net.provider;
/**
* Base provider implementation.
*/
public abstract class AbstractProvider implements Provider {
private final ProviderId providerId;
/**
* Creates a provider with the supplier identifier.
*
* @param id provider id
*/
protected AbstractProvider(ProviderId id) {
this.providerId = id;
}
@Override
public ProviderId id() {
return providerId;
}
}
......@@ -10,6 +10,6 @@ public interface Provided {
*
* @return provider identification
*/
ProviderId id();
ProviderId providerId();
}
......