001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package org.ietf.jgss;
019:
020: public class MessageProp {
021:
022: // privacy state
023: private boolean privState;
024:
025: // quality-of-protection
026: private int qop /* = 0 */;
027:
028: // duplicate token
029: private boolean duplicate;
030:
031: // old token
032: private boolean old;
033:
034: // unseq
035: private boolean unseq;
036:
037: // gap
038: private boolean gap;
039:
040: // minor status
041: private int minorStatus /* = 0 */;
042:
043: // minor status string
044: private String minorString;
045:
046: public MessageProp(boolean privState) {
047: super ();
048: this .privState = privState;
049: }
050:
051: public MessageProp(int qop, boolean privState) {
052: this (privState);
053: this .qop = qop;
054: }
055:
056: public int getQOP() {
057: return qop;
058: }
059:
060: public boolean getPrivacy() {
061: return privState;
062: }
063:
064: public boolean isDuplicateToken() {
065: return duplicate;
066: }
067:
068: public boolean isOldToken() {
069: return old;
070: }
071:
072: public boolean isUnseqToken() {
073: return unseq;
074: }
075:
076: public boolean isGapToken() {
077: return gap;
078: }
079:
080: public int getMinorStatus() {
081: return minorStatus;
082: }
083:
084: public String getMinorString() {
085: return minorString;
086: }
087:
088: public void setQOP(int qop) {
089: this .qop = qop;
090: }
091:
092: public void setPrivacy(boolean privState) {
093: this .privState = privState;
094: }
095:
096: public void setSupplementaryStates(boolean duplicate, boolean old,
097: boolean unseq, boolean gap, int minorStatus,
098: String minorString) {
099: this.duplicate = duplicate;
100: this.old = old;
101: this.unseq = unseq;
102: this.gap = gap;
103: this.minorStatus = minorStatus;
104: this.minorString = minorString;
105: }
106: }
|