Open Kilda Java Documentation
FlowOperationsBolt.java
Go to the documentation of this file.
1 /* Copyright 2017 Telstra Open Source
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 package org.openkilda.wfm.topology.nbworker.bolts;
17 
21 
22 import org.apache.storm.topology.OutputFieldsDeclarer;
23 import org.apache.storm.tuple.Fields;
24 import org.apache.storm.tuple.Tuple;
25 import org.neo4j.driver.v1.Session;
26 import org.slf4j.Logger;
27 import org.slf4j.LoggerFactory;
28 
29 import java.util.List;
30 
31 public class FlowOperationsBolt extends NeoOperationsBolt {
32 
33  private static final Logger LOGGER = LoggerFactory.getLogger(FlowOperationsBolt.class);
34 
35  public FlowOperationsBolt(Auth neoAuth) {
36  super(neoAuth);
37  }
38 
39  @Override
40  List<? extends InfoData> processRequest(Tuple tuple, BaseRequest request, Session session) {
41  LOGGER.warn("Received unsupported Flow Operation");
42  return null;
43  }
44 
45  @Override
46  public void declareOutputFields(OutputFieldsDeclarer declarer) {
47  declarer.declare(new Fields("response", "correlationId"));
48  }
49 
50  @Override
51  Logger getLogger() {
52  return LOGGER;
53  }
54 
55 }