SDX Network Information Collector SDK

net.juniper.smgt.gateway.gal
Interface NIC

All Known Subinterfaces:
SaeLocator

public interface NIC

The NIC interface provides the ability to lookup network state information given a key.


Method Summary
 void destroy()
          Cleanup method
 net.juniper.smgt.gateway.gal.mbeans.NicProxyMgmtMBean getManagement()
          Return the management interface which gives the caller access to the management counters
 void invalidateLookup(NicKey key, NicValue value)
          Used to signal to a NIC component that a key/value pair (returned from one of the lookup methods) resulted in a failure when the value was used.
 java.util.Map lookup(java.util.Collection key)
          Used to perform a "bulk" lookup operation.
 java.util.Collection lookup(NicKey key)
          Used to return the collection of values associated with the passed-in key object.
 NicValue lookupSingle(NicKey key)
          Used to return a single value associated with the passed-in key object.
 

Method Detail

lookup

java.util.Map lookup(java.util.Collection key)
                     throws java.lang.IllegalArgumentException,
                            java.lang.UnsupportedOperationException,
                            NicInternalException
Used to perform a "bulk" lookup operation.

Given a collection of keys, it returns a Map with the passed-in key objects as the Map keys and their asociated information as values. If no associated value was found for one of the keys, there will be no entry for this key object in the Map.

Note that, this method is optional. See the documentation of your specific NIC to check whether it is supported or not. Also, to check for the expected type of the key objects in the input Collection and the type of the values in the returned Map.

Parameters:
key - the Collection of key objects
Returns:
a map containing the key and value(s) pair for each passed-in key
Throws:
java.lang.UnsupportedOperationException - if this method is not supported by the NIC implementation
java.lang.IllegalArgumentException - if the key objects in the passed-in Collection are not of the expected type
NicInternalException - for any other NIC implementation specific exceptions

invalidateLookup

void invalidateLookup(NicKey key,
                      NicValue value)
Used to signal to a NIC component that a key/value pair (returned from one of the lookup methods) resulted in a failure when the value was used. If the NIC component has this result cached, it will be removed from the cache.

Parameters:
key - the key object that was passed to the lookup method
value - the value object returned from the lookup method

lookup

java.util.Collection lookup(NicKey key)
                            throws java.lang.IllegalArgumentException,
                                   NicInternalException
Used to return the collection of values associated with the passed-in key object. If no associated values were found, the method returns an empty Collection.

Parameters:
key - the key object
Returns:
the collection of values associated with the passed-in key
Throws:
java.lang.IllegalArgumentException - if the key object is not of the expected type
NicInternalException - for any other NIC implementation specific exceptions

lookupSingle

NicValue lookupSingle(NicKey key)
                      throws java.lang.IllegalArgumentException,
                             AmbiguousKeyException,
                             NicInternalException
Used to return a single value associated with the passed-in key object.

If no associated value was found,the method returns null. If multiple values are found, the NIC can choose one value to return to the caller.

Parameters:
key - the key object
Returns:
the value associated with the passed-in key
Throws:
java.lang.IllegalArgumentException - if the key object is not of the expected type
AmbiguousKeyException - if the key object does not uniquely identify one value and the NIC implmenetation expects it to.
NicInternalException - for any other NIC implementation specific exceptions

destroy

void destroy()
Cleanup method


getManagement

net.juniper.smgt.gateway.gal.mbeans.NicProxyMgmtMBean getManagement()
Return the management interface which gives the caller access to the management counters


SDX Network Information Collector SDK