|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.geronimo.corba.util.Util
public final class Util
Various utility functions.
Note: #getORB() and #getCodec() rely on UtilInitializer to initialze the ORB and codec.
UtilInitializer
Constructor Summary | |
---|---|
Util()
|
Method Summary | |
---|---|
static String |
buildScopedUserName(String user,
String domain)
|
static String |
byteToString(byte[] data)
|
static String[] |
createCorbaIds(Class type)
|
static String |
decodeGeneralName(byte[] name)
|
static String |
decodeGSSExportName(byte[] name_tok)
This function reads a name from a byte array which was created by the gssExportName() method. |
static boolean |
decodeGSSUPToken(Codec codec,
byte[] token_arr,
org.omg.GSSUP.InitialContextToken gssup_tok)
Decode an GSSUP InitialContextToken from a GSSToken. |
static String |
decodeOID(byte[] oid)
|
static DERObjectIdentifier |
decodeOIDDERObjectIdentifier(byte[] oid)
|
static byte[] |
encodeGeneralName(GeneralName generalName)
|
static byte[] |
encodeGeneralName(String name)
|
static byte[] |
encodeGeneralName(X509Name x509Name)
|
static byte[] |
encodeGSSExportName(String oid,
String name)
This method encodes a name as if it was encoded using the GSS-API gss_export_name() function call (see RFC 2743, page 84). |
static byte[] |
encodeGSSUPToken(ORB orb,
Codec codec,
String user,
String pwd,
String target)
Encode a mechanism independent initial context token (GSSToken). |
static byte[] |
encodeOID(DERObjectIdentifier oid)
|
static byte[] |
encodeOID(String oid)
|
static String |
extractUserNameFromScopedName(byte[] scopedNameBytes)
See csiv2 spec 16.2.5 par. 63-64. |
static String |
extractUserNameFromScopedName(String scopedUserName)
|
static Codec |
getCodec()
|
static Object |
getEJBProxy(org.apache.openejb.ProxyInfo info)
|
static HandleDelegate |
getHandleDelegate()
|
static ORB |
getORB()
|
static ORBConfiguration |
getRegisteredORB(String id)
|
static Map |
mapMethodToOperation(Class intfClass)
|
static Map |
mapOperationToMethod(Class intfClass)
|
static Object |
readObject(Class type,
InputStream in)
|
static void |
registerORB(String id,
ORBConfiguration orb)
|
static void |
setORB(ORB orb)
|
static void |
throwException(Method method,
InputStream in)
|
static void |
unregisterORB(String id)
|
static void |
writeObject(Class type,
Object object,
OutputStream out)
|
static OutputStream |
writeUserException(Method method,
ResponseHandler reply,
Exception exception)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Util()
Method Detail |
---|
public static ORB getORB()
public static void registerORB(String id, ORBConfiguration orb)
public static ORBConfiguration getRegisteredORB(String id)
public static void unregisterORB(String id)
public static void setORB(ORB orb) throws UserException
UserException
public static Codec getCodec()
public static HandleDelegate getHandleDelegate() throws NamingException
NamingException
public static Object getEJBProxy(org.apache.openejb.ProxyInfo info)
public static byte[] encodeOID(String oid) throws IOException
IOException
public static byte[] encodeOID(DERObjectIdentifier oid) throws IOException
IOException
public static String decodeOID(byte[] oid) throws IOException
IOException
public static DERObjectIdentifier decodeOIDDERObjectIdentifier(byte[] oid) throws IOException
IOException
public static byte[] encodeGeneralName(String name) throws IOException
IOException
public static byte[] encodeGeneralName(X509Name x509Name) throws IOException
IOException
public static byte[] encodeGeneralName(GeneralName generalName) throws IOException
IOException
public static String decodeGeneralName(byte[] name) throws IOException
IOException
public static byte[] encodeGSSExportName(String oid, String name)
Offset | Meaning | Value |
0 | token id | 0x04 |
1 | token id | 0x01 |
2 | oid length | hi-byte (len/0xFF) |
3 | oid length | lo-byte (len%0xFF) |
4 | oid | oid:1.3.6.1.5.6.4 |
n+0 | name length | len/0xFFFFFF |
n+1 | name length | (len%0xFFFFFF)/0xFFFF |
n+2 | name length | ((len%0xFFFFFF)%0xFFFF)/0xFF |
n+3 | name length | ((len%0xFFFFFF)%0xFFFF)%0xFF |
n+4 | name | foo |
oid
- The oid of the mechanism this name is exported from.name
- The name to be exported.
public static String decodeGSSExportName(byte[] name_tok)
name_tok
- The GSS name token.
public static String extractUserNameFromScopedName(byte[] scopedNameBytes) throws UnsupportedEncodingException
scopedNameBytes
-
UnsupportedEncodingException
public static String extractUserNameFromScopedName(String scopedUserName)
public static String buildScopedUserName(String user, String domain)
public static byte[] encodeGSSUPToken(ORB orb, Codec codec, String user, String pwd, String target)
Offset | Meaning |
0 | ASN1 tag |
1 | token length (<128) |
2 | mechanism oid |
n | mechanism specific token (e.g. GSSUP::InitialContextToken) |
orb
- The orb to get an Any from.codec
- The codec to do the encoding of the Any.user
- The username.pwd
- The password of the user.target
- The target name.
public static boolean decodeGSSUPToken(Codec codec, byte[] token_arr, org.omg.GSSUP.InitialContextToken gssup_tok)
codec
- The codec to do the encoding of the Any.gssup_tok
- The InitialContextToken struct to fill in the decoded values.
public static String byteToString(byte[] data)
public static void writeObject(Class type, Object object, OutputStream out)
public static Object readObject(Class type, InputStream in)
public static void throwException(Method method, InputStream in) throws Throwable
Throwable
public static OutputStream writeUserException(Method method, ResponseHandler reply, Exception exception) throws Exception
Exception
public static String[] createCorbaIds(Class type)
public static Map mapMethodToOperation(Class intfClass)
public static Map mapOperationToMethod(Class intfClass)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |