DeviceReplyProcessor,
TxFacade,
DeviceRegistry,
- RequestContextStack{
+ RequestContextStack {
/**
* Method close all auxiliary connections and primary connection.
DeviceState getDeviceState();
/**
- * Method has to close TxManager ASAP we are notified about Closed Connection
+ * Method has to close TxManager ASAP we are notified about Closed Connection.
* @return sync. future for Slave and MD-SAL completition for Master
*/
ListenableFuture<Void> shuttingDownDataStoreTransactions();
/**
+ * Getter.
* @return current devices connection context
*/
ConnectionContext getPrimaryConnectionContext();
/**
+ * Getter.
* @return current devices auxiliary connection contexts
*/
ConnectionContext getAuxiliaryConnectionContexts(BigInteger cookie);
/**
+ * Getter.
* @return translator library
*/
TranslatorLibrary oook();
/**
- * store cancellable timeout handler of currently running barrier task
+ * store cancellable timeout handler of currently running barrier task.
*/
void setCurrentBarrierTimeout(Timeout timeout);
/**
+ * Getter.
* @return cancellable timeout handle of currently running barrier task
*/
Timeout getBarrierTaskTimeout();
<T extends OfHeader> MultiMsgCollector<T> getMultiMsgCollector(final RequestContext<List<T>> requestContext);
/**
- * indicates that device context is fully published (e.g.: packetIn messages should be passed)
+ * indicates that device context is fully published (e.g.: packetIn messages should be passed).
*/
void onPublished();
/**
- * change packetIn rate limiter borders
- *
+ * change packetIn rate limiter borders.
* @param upperBound max amount of outstanding packetIns
*/
void updatePacketInRateLimit(long upperBound);
/**
+ * Getter.
* @return registry point for item life cycle sources of device
*/
ItemLifeCycleRegistry getItemLifeCycleSourceRegistry();
boolean isSkipTableFeatures();
/**
- * Setter for sal role service
- * @param salRoleService
+ * Setter for sal role service.
+ * @param salRoleService Role Service
*/
void setSalRoleService(@Nonnull final SalRoleService salRoleService);
/**
- * Make device slave
+ * Make device slave.
* @return listenable future from sal role service
*/
ListenableFuture<RpcResult<SetRoleOutput>> makeDeviceSlave();
import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
/**
- * API defining basic device information
+ * API defining basic device information.
*/
public interface DeviceInfo extends XidSequencer {
/**
+ * Getter.
* @return id of encapsulated node
*/
NodeId getNodeId();
/**
+ * Getter.
* @return {@link Node} instance identifier
*/
KeyedInstanceIdentifier<Node, NodeKey> getNodeInstanceIdentifier();
/**
+ * Getter.
* @return version
*/
short getVersion();
/**
+ * Getter.
* @return datapathId
*/
BigInteger getDatapathId();
/**
+ * Getter.
* @return clustering service identifier
*/
ServiceGroupIdentifier getServiceIdentifier();
/**
- * Many uses in log, this will make code more readable
+ * Many uses in log, this will make code more readable.
* @return string representation of nodeId
*/
default String getLOGValue() {
TranslatorLibrarian {
/**
- * invoked after all services injected
+ * invoked after all services injected.
*/
void initialize();
import org.opendaylight.openflowplugin.api.openflow.registry.meter.DeviceMeterRegistry;
/**
- * Flows, Groups and Meter registry
+ * Flows, Groups and Meter registry.
*/
public interface DeviceRegistry {
/**
* Method exposes flow registry used for storing flow ids identified by calculated flow hash.
- *
- * @return
+ * @return DeviceFlowRegistry
*/
DeviceFlowRegistry getDeviceFlowRegistry();
/**
* Method exposes device group registry used for storing group ids.
- *
- * @return
+ * @return DeviceGroupRegistry
*/
DeviceGroupRegistry getDeviceGroupRegistry();
/**
* Method exposes device meter registry used for storing meter ids.
- *
- * @return
+ * @return DeviceMaterRegistry
*/
DeviceMeterRegistry getDeviceMeterRegistry();
package org.opendaylight.openflowplugin.api.openflow.device;
/**
- * Holder of device's structure
+ * Holder of device's structure.
*/
public interface DeviceState {
/**
* Return true if we have relevant meter information
- * from device
- *
- * @return
+ * from device.
*/
boolean isMetersAvailable();
/**
* Return true if we have relevant group information
- * from device
- *
- * @return
+ * from device.
*/
boolean isGroupAvailable();
/**
* Method returns true, if device capabilities provides flow statistics.
- *
- * @return
*/
boolean isFlowStatisticsAvailable();
/**
* Method returns true, if device capabilities provides table statistics.
- *
- * @return
*/
boolean isTableStatisticsAvailable();
/**
* Method returns true, if device capabilities provides flow statistics.
- *
- * @return
*/
boolean isPortStatisticsAvailable();
/**
* Method returns true, if device capabilities provides queue statistics.
- *
- * @return
*/
boolean isQueueStatisticsAvailable();
package org.opendaylight.openflowplugin.api.openflow.device;
/**
- * @author tkubas
+ * Message translator.
* @param <I> input message
* @param <O> output message
*
public interface MessageTranslator<I, O> {
/**
- * Translates from input to output
- * @param input
- * @param deviceInfo
- * @param connectionDistinguisher
+ * Translates from input to output.
+ * @param input input
+ * @param deviceInfo node information
+ * @param connectionDistinguisher connection distinguisher
* @return message of output type
*/
O translate(I input, DeviceInfo deviceInfo, Object connectionDistinguisher);
/**
* Request context handles all requests on device. Number of requests is limited by request quota. When this quota is
* exceeded all rpc's will end up with exception.
- * <p>
- * Created by Martin Bobak <mbobak@cisco.com> on 25.2.2015.
*/
public interface RequestContext<T> extends RequestFutureContext<T>, AutoCloseable {
/**
* Returns XID generated for this request.
- *
* @return Allocated XID, or null if the device has disconnected.
*/
@Nullable Xid getXid();
/**
* Returns request timeout value.
- *
- * @return
+ * @return timeout
*/
long getWaitTimeout();
import javax.annotation.Nullable;
/**
- * Created by Martin Bobak <mbobak@cisco.com> on 1.4.2015.
+ * Request context stack.
*/
public interface RequestContextStack {
/**
* Method returns new request context for current request.
- *
* @return A request context, or null if one cannot be created.
*/
@Nullable <T> RequestContext<T> createRequestContext();
import org.opendaylight.yangtools.yang.common.RpcResult;
/**
- * Created by Martin Bobak <mbobak@cisco.com> on 25.3.2015.
- * @param <T>
+ * Request context.
+ * @param <T> rpc result type
*/
public interface RequestFutureContext<T> {
/**
* Method returns future to be used for handling device requests.
- *
- * @return
+ * @return rpc result
*/
ListenableFuture<RpcResult<T>> getFuture();
public interface TranslatorLibrary {
/**
- * @param key
- * @return
+ * Lookup translator.
+ * @param key a key
+ * @return translator
*/
<I, O> MessageTranslator<I, O> lookupTranslator(TranslatorKey key);
}
import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.md.sal.common.api.data.TransactionChainClosedException;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
/**
- * Handles operations with transactions
+ * Handles operations with transactions.
*/
public interface TxFacade {
final T data);
/**
- * Method creates put operation using provided data in underlying transaction chain and flag to create missing parents
- * WARNING: This method is slow because of additional reading cost. Use it only if you really need to create parents.
+ * Method creates put operation using provided data in underlying transaction
+ * chain and flag to create missing parents.
+ * WARNING: This method is slow because of additional reading cost.
+ * Use it only if you really need to create parents.
*/
<T extends DataObject> void writeToTransactionWithParentsSlow(final LogicalDatastoreType store,
final InstanceIdentifier<T> path,
import com.google.common.base.Preconditions;
-/**
- * Created by Martin Bobak <mbobak@cisco.com> on 26.2.2015.
- */
public final class Xid {
private final Long value;
/**
* Method reserve unique XID for Device Message.
- * Attention: OFJava expect the message, otherwise OutboundQueue could stop working.
+ * Attention: OFJava expect the message,
+ * otherwise OutboundQueue could stop working.
* @return Reserved XID
*/
Long reserveXidForDeviceMessage();
package org.opendaylight.openflowplugin.api.openflow.device.exception;
/**
- * Created by Martin Bobak <mbobak@cisco.com> on 25.2.2015.
+ * Request quota exception.
*/
public class RequestQuotaExceededException extends Exception {
private static final long serialVersionUID = 1L;
import org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContext;
/**
- * Interface handles MASTER initialization on ownership change
+ * Interface handles MASTER initialization on ownership change.
*/
public interface ClusterInitializationPhaseHandler {
/**
- * Method for initialization cycle between contexts
+ * Method for initialization cycle between contexts.
* @param connectionContext to check actual connection state
*/
boolean onContextInstantiateService(final ConnectionContext connectionContext);
/**
- * Method for initial submit transaction after successful initial gathering
+ * Method for initial submit transaction after successful initial gathering.
*/
default void initialSubmitTransaction(){
- //This method need to be override only in device context to submit initial data
+ //This method need to be override only in device context to submit initial data.
}
}
void setLifecycleInitializationPhaseHandler(final ClusterInitializationPhaseHandler handler);
default void setInitialSubmitHandler(final ClusterInitializationPhaseHandler initialSubmitHandler) {
- //Need to be only set in statistics context where after successful initial gather
- //tx need to be submitted
+ //Need to be only set in statistics context where after successful initial gather tx need to be submitted
}
}
* Method is used to propagate information about established connection with device.
* It propagates connected device's connection context.
*/
- ConnectionStatus deviceConnected(ConnectionContext connectionContext) throws Exception;
+ ConnectionStatus deviceConnected(ConnectionContext connectionContext)
+ throws Exception;
}
* Method is used to propagate information about closed connection with device.
* It propagates connected device's connection context.
*/
- void onDeviceDisconnected(ConnectionContext connectionContext);
-}
+ void onDeviceDisconnected(final ConnectionContext connectionContext);
+}
\ No newline at end of file
import org.opendaylight.openflowplugin.api.openflow.lifecycle.LifecycleService;
/**
- * openflowplugin-api
- * org.opendaylight.openflowplugin.api.openflow.device.handlers
- *
* Interface represent handler for new connected device building cycle. Every implementation
* have some unnecessary steps which has to be done before add new Device instance.
- *
- * Created: Apr 3, 2015
*/
public interface DeviceInitializationPhaseHandler {
/**
* Method represents an initialization cycle for {@link DeviceContext} preparation for use.
- *
* @param deviceInfo - device
* @param lifecycleService - cluster singleton service
* @throws Exception - needs to be catch in ConnectionHandler implementation
package org.opendaylight.openflowplugin.api.openflow.device.handlers;
/**
- * openflowplugin-api
- * org.opendaylight.openflowplugin.api.openflow.device.handlers
- *
* Interface has to implement all relevant manager to correctly handling
* device initialization and termination phase. Methods are used for order
* handlers in initialization/termination phase. Ordering is easily changed
* by definition.
- *
*/
public interface DeviceLifecycleSupervisor {
/**
* Method sets relevant {@link DeviceInitializationPhaseHandler} for building
* handler's chain for new Device initial phase.
- *
* @param handler initialization phase handler
*/
void setDeviceInitializationPhaseHandler(DeviceInitializationPhaseHandler handler);
/**
* Method sets relevant {@link DeviceInitializationPhaseHandler} for annihilating
* handler's chain for dead Device termination phase.
- *
* @param handler termination phase handler
*/
void setDeviceTerminationPhaseHandler(DeviceTerminationPhaseHandler handler);
/**
* Method is used to propagate information about device being removed from manager.
*/
- void onDeviceRemoved(DeviceInfo deviceInfo);
+ void onDeviceRemoved(final DeviceInfo deviceInfo);
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortStatusMessage;
/**
- * @author tkubas
+ * Device reply processor.
*/
public interface DeviceReplyProcessor {
/**
- * Method that set future to context in Map
- *
- * @param ofHeader
+ * Method that set future to context in Map.
+ * @param ofHeader openflow header
*/
void processReply(OfHeader ofHeader);
/**
- * Method that set future to context in Map
- *
+ * Method that set future to context in Map.
* @param xid xid
* @param ofHeaderList openflow header list
*/
void processReply(Xid xid, List<? extends OfHeader> ofHeaderList);
/**
- * Method process async flow removed from device
- *
+ * Method process async flow removed from device.
* @param flowRemoved flow removed
*/
void processFlowRemovedMessage(FlowRemoved flowRemoved);
/**
- * Method process async port status from device
- *
+ * Method process async port status from device.
* @param portStatus port status
*/
void processPortStatusMessage(PortStatusMessage portStatus);
/**
- * Method process async packet in from device
- *
+ * Method process async packet in from device.
* @param packetInMessage packet in message
*/
void processPacketInMessage(PacketInMessage packetInMessage);
/**
- * Processing of experimenter symmetric message from device
- *
+ * Processing of experimenter symmetric message from device.
* @param notification notification
*/
void processExperimenterMessage(ExperimenterMessage notification);
/**
* Method represents a termination cycle for {@link DeviceContext}.
* @param deviceInfo {@link org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo}
- *
*/
void onDeviceContextLevelDown(final @CheckForNull DeviceInfo deviceInfo);
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
/**
- * <p>
- * openflowplugin-api
- * org.opendaylight.openflowplugin.api.openflow.device
* Collects multipart msgs from device by provided XID and returns them
* to the caller as request/collection response one-to-one contract.
- *
- * @author <a href="mailto:vdemcak@cisco.com">Vaclav Demcak</a>
- * @author <a href="mailto:tkubas@cisco.com">Timotej Kubas</a>
- * </p>
- * Created: Mar 23, 2015
*/
public interface MultiMsgCollector<T extends OfHeader> {
/**
* Method adds a reply multipart message to the collection and if the message has marker
* "I'M A LAST" method set whole Collection to Future object and remove from cache.
- *
* @param reply reply
* @param reqMore request more replies
* @param eventIdentifier event identifier
* Null response could be a valid end multipart collecting event for barrier response scenario.
* We are not able to resolve an issue (it is or it isn't barrier scenario) so we have to finish
* collecting multipart messages successfully.
- *
* @param eventIdentifier event identifier
*/
void endCollecting(@Nullable EventIdentifier eventIdentifier);
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OpenflowProtocolListener;
/**
- * Created by Martin Bobak <mbobak@cisco.com> on 4.4.2015.
+ * Facade for openflow protocol listener.
*/
public interface OpenflowMessageListenerFacade extends OpenflowProtocolListener {
}