This project has retired. For details please refer to its Attic page.
Source code
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.util.StringIdentifierFactory;
022import org.apache.reef.tang.annotations.Name;
023import org.apache.reef.tang.annotations.NamedParameter;
024import org.apache.reef.wake.EventHandler;
025import org.apache.reef.wake.IdentifierFactory;
026import org.apache.reef.wake.remote.Codec;
027import org.apache.reef.wake.remote.transport.TransportFactory;
028import org.apache.reef.wake.remote.transport.netty.MessagingTransportFactory;
029
030public class NetworkServiceParameters {
031
032  @NamedParameter
033  public static class TaskId implements Name<String> {
034
035  }
036
037  @NamedParameter(doc = "identifier factory for the service", short_name = "factory",
038      default_class = StringIdentifierFactory.class)
039  public static class NetworkServiceIdentifierFactory implements Name<IdentifierFactory> {
040  }
041
042  @NamedParameter(doc = "port for the network service", short_name = "nsport", default_value = "0")
043  public static class NetworkServicePort implements Name<Integer> {
044  }
045
046  @NamedParameter(doc = "codec for the network service", short_name = "nscodec")
047  public static class NetworkServiceCodec implements Name<Codec<?>> {
048  }
049
050  @NamedParameter(doc = "transport factory for the network service", short_name = "nstransportfactory",
051      default_class = MessagingTransportFactory.class)
052  public static class NetworkServiceTransportFactory implements Name<TransportFactory> {
053  }
054
055  @NamedParameter(doc = "network receive handler for the network service", short_name = "nshandler")
056  public static class NetworkServiceHandler implements Name<EventHandler<?>> {
057  }
058
059  @NamedParameter(doc = "network exception handler for the network service", short_name = "exhandler")
060  public static class NetworkServiceExceptionHandler implements Name<EventHandler<?>> {
061  }
062}