📄 gssmanager.java
字号:
* @throws GSSException If this service is unavailable. */ public abstract void addProviderAtFront(Provider p, Oid mech) throws GSSException; /** * Factory method for creating a previously exported context. The * context properties will be determined from the input token and can't * be modified through the set methods. * * @param interProcessToken The token previously emitted from the * export method. * @return The context. * @throws GSSException If this operation fails. */ public abstract GSSContext createContext(byte[] interProcessToken) throws GSSException; /** * Factory method for creating a context on the acceptor' side. The * context's properties will be determined from the input token supplied * to the accept method. * * @param myCred Credentials for the acceptor. Use <code>null</code> to * act as a default acceptor principal. * @return The context. * @throws GSSException If this operation fails. */ public abstract GSSContext createContext(GSSCredential myCred) throws GSSException; /** * Factory method for creating a context on the initiator's side. * Context flags may be modified through the mutator methods prior to * calling {@link * GSSContext#initSecContext(java.io.InputStream,java.io.OutputStream)}. * * @param peer Name of the target peer. * @param mech Oid of the desired mechanism. Use <code>null</code> * to request default mechanism. * @param myCred Credentials of the initiator. Use <code>null</code> * default initiator principal. * @param lifetime The request lifetime, in seconds, for the context. * Use {@link GSSContext#INDEFINITE_LIFETIME} and * {@link GSSContext#DEFAULT_LIFETIME} to request * indefinite or default context lifetime. * @return The context. * @throws GSSException If this operation fails. */ public abstract GSSContext createContext(GSSName peer, Oid mech, GSSCredential myCred, int lifetime) throws GSSException; /** * Factory method for acquiring default credentials. This will cause * the GSS-API to use system specific defaults for the set of * mechanisms, name, and a DEFAULT lifetime. * * @param usage The intended usage for this credential object. The * value of this parameter must be one of: * {@link GSSCredential#ACCEPT_AND_INITIATE}, * {@link GSSCredential#ACCEPT_ONLY}, * {@link GSSCredential#INITIATE_ONLY}. * @return The credential. * @throws GSSException If this operation fails. */ public abstract GSSCredential createCredential(int usage) throws GSSException; /** * Factory method for acquiring a single mechanism credential. * * @param aName Name of the principal for whom this credential is to * be acquired. Use <code>null</code> to specify the * default principal. * @param lifetime The number of seconds that credentials should remain * valid. Use {@link GSSCredential#INDEFINITE_LIFETIME} * to request that the credentials have the maximum * permitted lifetime. Use {@link * GSSCredential#DEFAULT_LIFETIME} to request default * credential lifetime. * @param mech The oid of the desired mechanism. Use <code>null</code> * to request the default mechanism(s). * @param usage The intended usage for this credential object. The * value of this parameter must be one of: * {@link GSSCredential#ACCEPT_AND_INITIATE}, * {@link GSSCredential#ACCEPT_ONLY}, * {@link GSSCredential#INITIATE_ONLY}. * @return The credential. * @throws GSSException If this operation fails. */ public abstract GSSCredential createCredential(GSSName aName, int lifetime, Oid mech, int usage) throws GSSException; /** * Factory method for acquiring credentials over a set of mechanisms. * Acquires credentials for each of the mechanisms specified in the * array called mechs. To determine the list of mechanisms' for which * the acquisition of credentials succeeded, the caller should use the * {@link GSSCredential#getMechs()} method. * * @param aName Name of the principal for whom this credential is to * be acquired. Use <code>null</code> to specify the * default principal. * @param lifetime The number of seconds that credentials should remain * valid. Use {@link GSSCredential#INDEFINITE_LIFETIME} * to request that the credentials have the maximum * permitted lifetime. Use {@link * GSSCredential#DEFAULT_LIFETIME} to request default * credential lifetime. * @param mechs The array of mechanisms over which the credential is * to be acquired. Use <code>null</code> for requesting * a system specific default set of mechanisms. * @param usage The intended usage for this credential object. The * value of this parameter must be one of: * {@link GSSCredential#ACCEPT_AND_INITIATE}, * {@link GSSCredential#ACCEPT_ONLY}, * {@link GSSCredential#INITIATE_ONLY}. * @return The credential. * @throws GSSException If this operation fails. */ public abstract GSSCredential createCredential(GSSName aName, int lifetime, Oid[] mechs, int usage) throws GSSException; /** * Factory method to convert a contiguous byte array containing a name * from the specified namespace to a {@link GSSName} object. In general, * the {@link GSSName} object created will not be an MN; two examples that * are exceptions to this are when the namespace type parameter indicates * {@link GSSName#NT_EXPORT_NAME} or when the GSS-API implementation is not * multi-mechanism. * * @param name The byte array containing the name to create. * @param nameType The Oid specifying the namespace of the name supplied * in the byte array. Note that nameType serves to * describe and qualify the interpretation of the input * name byte array, it does not necessarily imply a type * for the output GSSName implementation. "null" value * can be used to specify that a mechanism specific * default syntax should be assumed by each mechanism * that examines the byte array. * @return The name. * @throws GSSException If this operation fails. */ public abstract GSSName createName(byte[] name, Oid nameType) throws GSSException; /** * Factory method to convert a contiguous byte array containing a name * from the specified namespace to a GSSName object that is an MN. In * other words, this method is a utility that does the equivalent of two * steps: {@link #createName(byte[],org.ietf.jgss.Oid)} and then also * {@link GSSName#canonicalize(org.ietf.jgss.Oid)}. * * @param name The byte array representing the name to create. * @param nameType The Oid specifying the namespace of the name supplied * in the byte array. Note that nameType serves to * describe and qualify the interpretation of the input * name byte array, it does not necessarily imply a type * for the output GSSName implementation. "null" value * can be used to specify that a mechanism specific * default syntax should be assumed by each mechanism * that examines the byte array. * @param mech Oid specifying the mechanism for which this name * should be created. * @return The name. * @throws GSSException If this operation fails. */ public abstract GSSName createName(byte[] name, Oid nameType, Oid mech) throws GSSException; /** * Factory method to convert a contiguous string name from the specified * namespace to a {@link GSSName} object. In general, the {@link GSSName} * object created will not be an MN; two examples that are exceptions to * this are when the namespace type parameter indicates {@link * GSSName#NT_EXPORT_NAME} or when the GSS-API implementation is not * multi-mechanism. * * @param nameStr The string representing a printable form of the name * to create. * @param nameType The Oid specifying the namespace of the printable name * supplied. Note that nameType serves to describe and * qualify the interpretation of the input nameStr, it * does not necessarily imply a type for the output * GSSName implementation. "null" value can be used to * specify that a mechanism specific default printable * syntax should be assumed by each mechanism that * examines nameStr. * @return The name. * @throws GSSException If this operation fails. */ public abstract GSSName createName(String nameStr, Oid nameType) throws GSSException; /** * Factory method to convert a contiguous string name from the specified * namespace to an GSSName object that is a mechanism name (MN). In * other words, this method is a utility that does the equivalent of two * steps: the {@link #createName(java.lang.String,org.ietf.jgss.Oid)} * and then also {@link GSSName#canonicalize(org.ietf.jgss.Oid)}. * * @param nameStr The string representing a printable form of the name * to create. * @param nameType The Oid specifying the namespace of the printable name * supplied. Note that nameType serves to describe and * qualify the interpretation of the input nameStr, it * does not necessarily imply a type for the output * GSSName implementation. "null" value can be used to * specify that a mechanism specific default printable * syntax should be assumed when the mechanism examines * nameStr. * @param mech Oid specifying the mechanism for which this name * should be created. * @return The name. * @throws GSSException If this operation fails. */ public abstract GSSName createName(String nameStr, Oid nameType, Oid mech) throws GSSException; /** * Returns an array of {@link Oid} objects indicating mechanisms available * to GSS-API callers. A <code>null</code> value is returned when no * mechanism are available (an example of this would be when mechanism are * dynamically configured, and currently no mechanisms are installed). * * @return The array of available mechanisms, or <code>null</code>. */ public abstract Oid[] getMechs(); /** * Returns an array of {@link Oid} objects corresponding to the mechanisms * that support the specific name type. <code>null</code> is returned when * no mechanisms are found to support the specified name type. * * @param name The Oid object for the name type. * @return The array of mechanisms, or <code>null</code>. */ public abstract Oid[] getMechsForName(Oid name); /** * Returns name type Oid's supported by the specified mechanism. * * @param mechanism The Oid object for the mechanism to query. * @return The name type Oid's supported by the mechanism. * @throws GSSException If this operation fails. */ public abstract Oid[] getNamesForMech(Oid mechanism) throws GSSException;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -