Examples of ByteArrayKey


Examples of org.jacorb.poa.util.ByteArrayKey


    protected synchronized StringPair[] deliverContent()
    {
        StringPair[] result = new StringPair[objectMap.size()];
        ByteArrayKey oidbak;
        Enumeration en = objectMap.keys();

        for ( int i = 0; i < result.length; i++ )
        {
            oidbak = (ByteArrayKey) en.nextElement();
            result[i] = new StringPair
            (
                oidbak.toString(),
                objectMap.get(oidbak).getClass().getName()
            );
        }
        return result;
View Full Code Here

Examples of org.jacorb.poa.util.ByteArrayKey

    protected byte[] getObjectId(Servant servant)
    {
        if (!unique)
            throw new POAInternalError("error: not UNIQUE_ID policy (getObjectId)");

        ByteArrayKey oidbak = (ByteArrayKey)servantMap.get(servant);

        if (oidbak != null)
            return oidbak.getBytes();

        return null;
    }
View Full Code Here

Examples of org.jacorb.poa.util.ByteArrayKey



    protected Servant getServant(byte[] oid)
    {
        return (Servant) objectMap.get( new ByteArrayKey( oid ) );
    }
View Full Code Here

Examples of org.jacorb.poa.util.ByteArrayKey

    protected synchronized Servant incarnate( byte[] oid,
                                              ServantActivator servant_activator,
                                              org.omg.PortableServer.POA poa )
        throws org.omg.PortableServer.ForwardRequest
    {
        ByteArrayKey oidbak = new ByteArrayKey( oid );
        Servant servant = null;

        if (logger.isInfoEnabled())
        {
            logger.info( "oid: " + POAUtil.convert(oid) +
View Full Code Here

Examples of org.jacorb.poa.util.ByteArrayKey

                           ServantActivator servantActivator,
                           POA poa,
                           boolean cleanupInProgress)
        throws ObjectNotActive
    {
        ByteArrayKey oidbak = new ByteArrayKey( oid );

        // check that the same oid is not already being deactivated
        // (this must be synchronized to avoid having two independent
        // threads register the same oid)
        synchronized( deactivationListLock )
View Full Code Here

Examples of org.jacorb.poa.util.ByteArrayKey

                          RequestController requestController,
                          ServantActivator servantActivator,
                          POA poa,
                          boolean cleanupInProgress)
    {
        ByteArrayKey oidbak = new ByteArrayKey( oid );
        Servant servant = null;

        if (!objectMap.containsKey(oidbak))
        {
            // should not happen but ...
View Full Code Here

Examples of org.jacorb.poa.util.ByteArrayKey

    /**
     * <code>testKey1</code> tests that JacORB can handle a null key.
     */
    public void testKey1 ()
    {
        ByteArrayKey bk = new ByteArrayKey( (byte[])null );

        try
        {
            bk.toString();
            bk.getBytes();
            bk.hashCode();

            if( System.identityHashCode( bk.toString() ) !=
                System.identityHashCode( bk.toString() )  )
            {
                fail( "Different Strings returned on toString" );
            }
        }
        catch( Exception e )
View Full Code Here

Examples of org.jacorb.poa.util.ByteArrayKey

    /**
     * <code>testKey2</code> does some basic tests.
     */
    public void testKey2 ()
    {
        ByteArrayKey bk = new ByteArrayKey( ( "bytearraykeytest" ).getBytes() );

        try
        {
            bk.toString();
            bk.getBytes();
            bk.hashCode();

            if( System.identityHashCode( bk.toString() ) !=
                System.identityHashCode( bk.toString() )  )
            {
                fail( "Different Strings returned on toString" );
            }
        }
        catch( Exception e )
View Full Code Here

Examples of org.jacorb.poa.util.ByteArrayKey

     * @exception ServantAlreadyActive if an error occurs
     */
    protected synchronized void add( byte[] oid, Servant servant )
        throws ObjectAlreadyActive, ServantAlreadyActive
    {
        ByteArrayKey oidbak = new ByteArrayKey (oid);

        /* an inCarnation and activation with the same oid has
           priority, a reactivation for the same oid blocks until
           etherealization is complete */

 
View Full Code Here

Examples of org.jacorb.poa.util.ByteArrayKey


    protected synchronized StringPair[] deliverContent()
    {
        StringPair[] result = new StringPair[objectMap.size()];
        ByteArrayKey oidbak;
        Enumeration en = objectMap.keys();

        for ( int i = 0; i < result.length; i++ )
        {
            oidbak = (ByteArrayKey) en.nextElement();
            result[i] = new StringPair
            (
                oidbak.toString(),
                objectMap.get(oidbak).getClass().getName()
            );
        }
        return result;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.