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 * 019 */ 020 package org.apache.directory.server.kerberos.kdc; 021 022 023 import java.net.InetAddress; 024 025 import org.apache.directory.server.kerberos.shared.crypto.encryption.CipherTextHandler; 026 import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType; 027 import org.apache.directory.server.kerberos.shared.messages.KdcRequest; 028 import org.apache.directory.server.kerberos.shared.messages.KerberosMessage; 029 import org.apache.directory.server.kerberos.shared.store.PrincipalStore; 030 031 032 /** 033 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 034 * @version $Rev: 583938 $, $Date: 2007-10-11 21:57:20 +0200 (Thu, 11 Oct 2007) $ 035 */ 036 public class KdcContext 037 { 038 private static final long serialVersionUID = 6490030984626825108L; 039 040 private KdcServer config; 041 private PrincipalStore store; 042 private KdcRequest request; 043 private KerberosMessage reply; 044 private InetAddress clientAddress; 045 private CipherTextHandler cipherTextHandler; 046 private EncryptionType encryptionType; 047 048 049 /** 050 * @return Returns the config. 051 */ 052 public KdcServer getConfig() 053 { 054 return config; 055 } 056 057 058 /** 059 * @param config The config to set. 060 */ 061 public void setConfig( KdcServer config ) 062 { 063 this.config = config; 064 } 065 066 067 /** 068 * @return Returns the store. 069 */ 070 public PrincipalStore getStore() 071 { 072 return store; 073 } 074 075 076 /** 077 * @param store The store to set. 078 */ 079 public void setStore( PrincipalStore store ) 080 { 081 this.store = store; 082 } 083 084 085 /** 086 * @return Returns the request. 087 */ 088 public KdcRequest getRequest() 089 { 090 return request; 091 } 092 093 094 /** 095 * @param request The request to set. 096 */ 097 public void setRequest( KdcRequest request ) 098 { 099 this.request = request; 100 } 101 102 103 /** 104 * @return Returns the reply. 105 */ 106 public KerberosMessage getReply() 107 { 108 return reply; 109 } 110 111 112 /** 113 * @param reply The reply to set. 114 */ 115 public void setReply( KerberosMessage reply ) 116 { 117 this.reply = reply; 118 } 119 120 121 /** 122 * @return Returns the clientAddress. 123 */ 124 public InetAddress getClientAddress() 125 { 126 return clientAddress; 127 } 128 129 130 /** 131 * @param clientAddress The clientAddress to set. 132 */ 133 public void setClientAddress( InetAddress clientAddress ) 134 { 135 this.clientAddress = clientAddress; 136 } 137 138 139 /** 140 * @return Returns the {@link CipherTextHandler}. 141 */ 142 public CipherTextHandler getCipherTextHandler() 143 { 144 return cipherTextHandler; 145 } 146 147 148 /** 149 * @param cipherTextHandler The {@link CipherTextHandler} to set. 150 */ 151 public void setCipherTextHandler( CipherTextHandler cipherTextHandler ) 152 { 153 this.cipherTextHandler = cipherTextHandler; 154 } 155 156 157 /** 158 * Returns the encryption type to use for this session. 159 * 160 * @return The encryption type. 161 */ 162 public EncryptionType getEncryptionType() 163 { 164 return encryptionType; 165 } 166 167 168 /** 169 * Sets the encryption type to use for this session. 170 * 171 * @param encryptionType The encryption type to set. 172 */ 173 public void setEncryptionType( EncryptionType encryptionType ) 174 { 175 this.encryptionType = encryptionType; 176 } 177 }