Package org.onosproject.net.resource
Class Resources
- java.lang.Object
-
- org.onosproject.net.resource.Resources
-
@Beta public final class Resources extends java.lang.Object
Utility class for resource related classes.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ContinuousFactory
continuous(DeviceId device, java.lang.Class<?> cls)
Create a factory for continuous-type with the specified device ID and type.static ContinuousFactory
continuous(DeviceId device, java.lang.Object... components)
Create a factory for continuous-type with the specified device ID and components.static ContinuousFactory
continuous(DeviceId device, PortNumber port, java.lang.Class<?> cls)
Create a factory for continuous-type with the specified device ID, port number and type.static ContinuousFactory
continuous(DeviceId device, PortNumber port, java.lang.Object... components)
Create a factory for continuous-type with the specified device ID and components.static DiscreteFactory
discrete(DeviceId device)
Create a factory for discrete-type with the specified device ID.static DiscreteFactory
discrete(DeviceId device, java.lang.Object... components)
Create a factory for discrete-type with the specified device ID and components.static DiscreteFactory
discrete(DeviceId device, PortNumber port, java.lang.Object... components)
Create a factory for discrete-type with the specified device ID, port number and components.static DiscreteFactory
discrete(DiscreteResourceId id)
Create a factory for discrete-type with the specified resource ID.static DiscreteFactory
discrete(DiscreteResourceId parent, java.lang.Object child)
Creates a factory for discrete-type with the specified parent ID and child.
-
-
-
Method Detail
-
discrete
public static DiscreteFactory discrete(DiscreteResourceId id)
Create a factory for discrete-type with the specified resource ID.- Parameters:
id
- resource ID- Returns:
DiscreteFactory
-
discrete
public static DiscreteFactory discrete(DiscreteResourceId parent, java.lang.Object child)
Creates a factory for discrete-type with the specified parent ID and child.- Parameters:
parent
- ID of the parentchild
- child- Returns:
DiscreteFactory
-
discrete
public static DiscreteFactory discrete(DeviceId device)
Create a factory for discrete-type with the specified device ID.- Parameters:
device
- device ID- Returns:
DiscreteFactory
-
discrete
public static DiscreteFactory discrete(DeviceId device, java.lang.Object... components)
Create a factory for discrete-type with the specified device ID and components.- Parameters:
device
- device IDcomponents
- resource ID components other than the device ID- Returns:
DiscreteFactory
-
discrete
public static DiscreteFactory discrete(DeviceId device, PortNumber port, java.lang.Object... components)
Create a factory for discrete-type with the specified device ID, port number and components.- Parameters:
device
- device IDport
- port numbercomponents
- resource ID components other than the device ID and port number- Returns:
DiscreteFactory
-
continuous
public static ContinuousFactory continuous(DeviceId device, java.lang.Class<?> cls)
Create a factory for continuous-type with the specified device ID and type.- Parameters:
device
- device IDcls
- type of resource the returned factory will create- Returns:
ContinuousFactory
-
continuous
public static ContinuousFactory continuous(DeviceId device, java.lang.Object... components)
Create a factory for continuous-type with the specified device ID and components. The last element of the components must be aClass
instance. Otherwise, anIllegalArgumentException
is thrown.- Parameters:
device
- device IDcomponents
- resource ID components other than the device ID.- Returns:
ContinuousFactory
-
continuous
public static ContinuousFactory continuous(DeviceId device, PortNumber port, java.lang.Class<?> cls)
Create a factory for continuous-type with the specified device ID, port number and type.- Parameters:
device
- device IDport
- port numbercls
- type of resource the returned factory will create- Returns:
ContinuousFactory
-
continuous
public static ContinuousFactory continuous(DeviceId device, PortNumber port, java.lang.Object... components)
Create a factory for continuous-type with the specified device ID and components. The last element of the components must be aClass
instance. Otherwise, anIllegalArgumentException
is thrown.- Parameters:
device
- device IDport
- port numbercomponents
- resource ID components other than the device ID and port number.- Returns:
ContinuousFactory
-
-