1 25 package org.objectweb.carol.util.csiv2.struct; 26 27 import java.io.Serializable ; 28 29 import org.objectweb.carol.util.csiv2.gss.GSSHelper; 30 31 35 public class AsStruct implements Serializable { 36 37 40 private short targetSupports = 0; 41 42 45 private short targetRequires = 0; 46 47 50 private byte[] targetName = new byte[0]; 51 52 55 public byte[] getTargetName() { 56 return targetName; 57 } 58 59 62 public void setTargetName(String targetName) { 63 this.targetName = GSSHelper.encodeExported(targetName); 64 } 65 66 69 public byte[] getClientAuthenticationMech() { 70 if (targetName.length != 0) { 71 return GSSHelper.getMechOidDer(); 72 } else { 73 return new byte[0]; 74 } 75 } 76 77 80 public short getTargetRequires() { 81 return targetRequires; 82 } 83 84 87 public void setTargetRequires(int targetRequires) { 88 this.targetRequires = (short) targetRequires; 89 } 90 91 94 public short getTargetSupports() { 95 return targetSupports; 96 } 97 98 101 public void setTargetSupports(int targetSupports) { 102 this.targetSupports = (short) targetSupports; 103 } 104 105 } | Popular Tags |