001/** 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019package org.apache.reef.io.network.impl; 020 021import org.apache.reef.io.network.TransportFactory; 022import org.apache.reef.io.network.util.StringIdentifierFactory; 023import org.apache.reef.tang.annotations.Name; 024import org.apache.reef.tang.annotations.NamedParameter; 025import org.apache.reef.wake.EventHandler; 026import org.apache.reef.wake.IdentifierFactory; 027import org.apache.reef.wake.remote.Codec; 028 029public class NetworkServiceParameters { 030 031 @NamedParameter 032 public static class TaskId implements Name<String> { 033 034 } 035 036 @NamedParameter(doc = "identifier factory for the service", short_name = "factory", default_class = StringIdentifierFactory.class) 037 public static class NetworkServiceIdentifierFactory implements Name<IdentifierFactory> { 038 } 039 040 @NamedParameter(doc = "port for the network service", short_name = "nsport", default_value = "7070") 041 public static class NetworkServicePort implements Name<Integer> { 042 } 043 044 @NamedParameter(doc = "codec for the network service", short_name = "nscodec") 045 public static class NetworkServiceCodec implements Name<Codec<?>> { 046 } 047 048 @NamedParameter(doc = "transport factory for the network service", short_name = "nstransportfactory", default_class = MessagingTransportFactory.class) 049 public static class NetworkServiceTransportFactory implements Name<TransportFactory> { 050 } 051 052 @NamedParameter(doc = "network receive handler for the network service", short_name = "nshandler") 053 public static class NetworkServiceHandler implements Name<EventHandler<?>> { 054 } 055 056 @NamedParameter(doc = "network exception handler for the network service", short_name = "exhandler") 057 public static class NetworkServiceExceptionHandler implements Name<EventHandler<?>> { 058 } 059 060}