class OfflinePacketDeliverer implements PacketDeliverer {

    private static final Logger Log = LoggerFactory.getLogger(OfflinePacketDeliverer.class);

    private OfflineMessageStrategy messageStrategy;

    public OfflinePacketDeliverer() {
        this.messageStrategy = XMPPServer.getInstance().getOfflineMessageStrategy();
    }

    @Override
    public void deliver(Packet packet) throws UnauthorizedException, PacketException {<FILL_FUNCTION_BODY>}

}

        
        if (packet instanceof Message) {
            messageStrategy.storeOffline((Message) packet);
        }
        else if (packet instanceof Presence) {
            // presence packets are dropped silently
        }
        else if (packet instanceof IQ) {
            // IQ packets are logged before being dropped
            Log.warn(LocaleUtils.getLocalizedString("admin.error.routing") + "\n" + packet.toString());
        }
    
<no_super_class>