Package org.onosproject.net.resource
Class Resources
- java.lang.Object
 - 
- org.onosproject.net.resource.Resources
 
 
- 
@Beta public final class Resources extends java.lang.ObjectUtility class for resource related classes. 
- 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ContinuousFactorycontinuous(DeviceId device, java.lang.Class<?> cls)Create a factory for continuous-type with the specified device ID and type.static ContinuousFactorycontinuous(DeviceId device, java.lang.Object... components)Create a factory for continuous-type with the specified device ID and components.static ContinuousFactorycontinuous(DeviceId device, PortNumber port, java.lang.Class<?> cls)Create a factory for continuous-type with the specified device ID, port number and type.static ContinuousFactorycontinuous(DeviceId device, PortNumber port, java.lang.Object... components)Create a factory for continuous-type with the specified device ID and components.static DiscreteFactorydiscrete(DeviceId device)Create a factory for discrete-type with the specified device ID.static DiscreteFactorydiscrete(DeviceId device, java.lang.Object... components)Create a factory for discrete-type with the specified device ID and components.static DiscreteFactorydiscrete(DeviceId device, PortNumber port, java.lang.Object... components)Create a factory for discrete-type with the specified device ID, port number and components.static DiscreteFactorydiscrete(DiscreteResourceId id)Create a factory for discrete-type with the specified resource ID.static DiscreteFactorydiscrete(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 aClassinstance. Otherwise, anIllegalArgumentExceptionis 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 aClassinstance. Otherwise, anIllegalArgumentExceptionis thrown.- Parameters:
 device- device IDport- port numbercomponents- resource ID components other than the device ID and port number.- Returns:
 ContinuousFactory
 
 - 
 
 -