1 /* 2 * Copyright 2016 The gRPC Authors 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package io.grpc; 18 19 import java.net.SocketAddress; 20 import javax.net.ssl.SSLSession; 21 22 /** 23 * Stuff that are part of the public API but are not bound to particular classes, e.g., static 24 * methods, constants, attribute and context keys. 25 */ 26 public final class Grpc { Grpc()27 private Grpc() { 28 } 29 30 /** 31 * Attribute key for the remote address of a transport. 32 */ 33 @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1710") 34 public static final Attributes.Key<SocketAddress> TRANSPORT_ATTR_REMOTE_ADDR = 35 Attributes.Key.create("remote-addr"); 36 37 /** 38 * Attribute key for SSL session of a transport. 39 */ 40 @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1710") 41 public static final Attributes.Key<SSLSession> TRANSPORT_ATTR_SSL_SESSION = 42 Attributes.Key.create("ssl-session"); 43 } 44