protected void processOtherEvent(Sim_event ev)
    {
        try 
        {
            // get the sender ID.
            // NOTE: Sim_event.get_data() carries a generic object. It might
            //       carries Gridlet, String, etc depending on the sender.
            //       Therefore, be careful when casting the correct type of
            //       the object. In this example, the sender is expected to
            //       send an Integer object.
            Integer obj = (Integer) ev.get_data();

            // get the sender name
            String name = GridSim.getEntityName( obj.intValue() );
            switch ( ev.get_tag() )
            {
                case Example9.HELLO:
                    System.out.println(super.get_name() 
                            + ": received HELLO tag from " + name +
                            " at time " + GridSim.clock());
                    break;
                
                case Example9.TEST:
                    System.out.println(super.get_name() 
                            + ": received TEST tag from " + name + 
                            " at time " + GridSim.clock());
                    break;

                default:
                    break;
            }
        }
        catch (ClassCastException c) {
            System.out.println(super.get_name() + 
                    ".processOtherEvent(): Exception occurs.");
        }

    }