Example usage for java.util.logging Level FINEST

List of usage examples for java.util.logging Level FINEST

Introduction

In this page you can find the example usage for java.util.logging Level FINEST.

Prototype

Level FINEST

To view the source code for java.util.logging Level FINEST.

Click Source Link

Document

FINEST indicates a highly detailed tracing message.

Usage

From source file:com.sun.grizzly.http.jk.common.ChannelSocket.java

public int invoke(Msg msg, MsgContext ep) throws IOException {
    int type = ep.getType();

    switch (type) {
    case JkHandler.HANDLE_RECEIVE_PACKET:
        if (LoggerUtils.getLogger().isLoggable(Level.FINEST)) {
            LoggerUtils.getLogger().log(Level.FINEST, "RECEIVE_PACKET ?? ");
        }/*  w  w  w  .ja va 2  s  . c o  m*/
        return receive(msg, ep);
    case JkHandler.HANDLE_SEND_PACKET:
        return send(msg, ep);
    case JkHandler.HANDLE_FLUSH:
        return flush(msg, ep);
    }

    if (LoggerUtils.getLogger().isLoggable(Level.FINEST)) {
        LoggerUtils.getLogger().log(Level.FINEST, "Call next " + type + " " + next);
    }

    // Send notification
    if (nSupport != null) {
        Notification notif = (Notification) ep.getNote(notifNote);
        if (notif == null) {
            notif = new Notification("channelSocket.message", ep, requestCount);
            ep.setNote(notifNote, notif);
        }
        nSupport.sendNotification(notif);
    }

    if (next != null) {
        return next.invoke(msg, ep);
    } else {
        LoggerUtils.getLogger().info("No next ");
    }

    return OK;
}

From source file:tigase.muc.modules.PresenceModule.java

/**
 * Method description/*from w w  w  .j  a va  2s.c  o m*/
 * 
 * 
 * @param room
 * @param element
 * @param senderJID
 * @param senderNickname
 * @param newNickName
 * 
 * @throws MUCException
 * @throws TigaseStringprepException
 */
protected void processChangeNickname(final Room room, final Element element, final JID senderJID,
        final String senderNickname, final String newNickName) throws TigaseStringprepException, MUCException {
    if (log.isLoggable(Level.FINEST)) {
        log.finest("Processing stanza " + element.toString());
    }

    throw new MUCException(Authorization.FEATURE_NOT_IMPLEMENTED, "Will me done soon");

    // TODO Example 23. Service Denies Room Join Because Roomnicks Are
    // Locked Down (???)
}

From source file:org.apache.myfaces.application.ApplicationImpl.java

@Override
public final void setMessageBundle(final String messageBundle) {
    checkNull(messageBundle, "messageBundle");

    _messageBundle = messageBundle;/*  w  w  w .j  av  a  2 s. c o m*/
    if (log.isLoggable(Level.FINEST)) {
        log.finest("set MessageBundle = " + messageBundle);
    }
}

From source file:org.apache.myfaces.application.ApplicationImpl.java

@Override
public final void setNavigationHandler(final NavigationHandler navigationHandler) {
    checkNull(navigationHandler, "navigationHandler");

    _navigationHandler = navigationHandler;
    if (log.isLoggable(Level.FINEST)) {
        log.finest("set NavigationHandler = " + navigationHandler.getClass().getName());
    }//from  w w  w  .  ja  v a2 s  . co m
}

From source file:tigase.muc.modules.PresenceModule.java

/**
 * Method description//from   www .  j a va  2  s.  com
 * 
 * 
 * @param room
 * @param roomCreated
 * @param element
 * @param senderJID
 * @param nickname
 * 
 * @throws MUCException
 * @throws TigaseStringprepException
 */
protected void processEntering(final Room room, final boolean roomCreated, final Element element,
        final JID senderJID, final String nickname) throws MUCException, TigaseStringprepException {
    if (log.isLoggable(Level.FINEST)) {
        log.finest("Processing stanza " + element.toString());
    }

    final Affiliation affiliation = room.getAffiliation(senderJID.getBareJID());
    final Element xElement = element.getChild("x", "http://jabber.org/protocol/muc");
    final Element password = (xElement == null) ? null : xElement.getChild("password");

    if (room.getConfig().isPasswordProtectedRoom()) {
        final String psw = (password == null) ? null : password.getCData();
        final String roomPassword = room.getConfig().getPassword();

        if ((psw == null) || !psw.equals(roomPassword)) {

            // Service Denies Access Because No Password Provided
            if (log.isLoggable(Level.FINEST)) {
                log.finest("Password '" + psw + "' is not match to room password '" + roomPassword + "' ");
            }

            throw new MUCException(Authorization.NOT_AUTHORIZED);
        }
    }
    if (room.isRoomLocked() && (affiliation != Affiliation.owner)) {

        // Service Denies Access Because Room Does Not (Yet) Exist
        throw new MUCException(Authorization.ITEM_NOT_FOUND, null, "Room exists but is locked");
    }
    if (!affiliation.isEnterOpenRoom()) {

        // Service Denies Access Because User is Banned
        if (log.isLoggable(Level.INFO)) {
            log.info("User " + nickname + "' <" + senderJID.toString() + "> is on rooms '" + room.getRoomJID()
                    + "' blacklist");
        }

        throw new MUCException(Authorization.FORBIDDEN);
    } else if (room.getConfig().isRoomMembersOnly() && !affiliation.isEnterMembersOnlyRoom()) {

        // Service Denies Access Because User Is Not on Member List
        if (log.isLoggable(Level.INFO)) {
            log.info("User " + nickname + "' <" + senderJID.toString() + "> is NOT on rooms '"
                    + room.getRoomJID() + "' member list.");
        }

        throw new MUCException(Authorization.REGISTRATION_REQUIRED);
    }

    final BareJID currentOccupantJid = room.getOccupantsJidByNickname(nickname);

    if ((currentOccupantJid != null) && !currentOccupantJid.equals(senderJID.getBareJID())) {

        // Service Denies Access Because of Nick Conflict
        throw new MUCException(Authorization.CONFLICT);
    }

    // TODO Service Informs User that Room Occupant Limit Has Been Reached
    // Service Sends Presence from Existing Occupants to New Occupant
    for (String occupantNickname : room.getOccupantsNicknames()) {
        final BareJID occupantJid = room.getOccupantsJidByNickname(occupantNickname);
        if (currentOccupantJid != null && currentOccupantJid.equals(occupantJid)) {
            continue;
        }
        Element op = room.getLastPresenceCopyByJid(occupantJid);

        final Collection<JID> occupantJIDs = room.getOccupantsJidsByNickname(occupantNickname);
        final BareJID occupantBareJID = room.getOccupantsJidByNickname(occupantNickname);
        final Affiliation occupantAffiliation = room.getAffiliation(occupantBareJID);
        final Role occupantRole = room.getRole(occupantNickname);

        if (config.isMultiItemMode()) {
            PresenceWrapper l = preparePresenceW(room, senderJID, op.clone(), occupantBareJID, occupantJIDs,
                    occupantNickname, occupantAffiliation, occupantRole);
            writer.write(l.packet);
        } else {
            for (JID jid : occupantJIDs) {
                Collection<JID> z = new ArrayList<JID>(1);
                z.add(jid);
                PresenceWrapper l = preparePresenceW(room, senderJID, op.clone(), occupantBareJID, z,
                        occupantNickname, occupantAffiliation, occupantRole);
                writer.write(l.packet);
            }
        }
    }

    final Role newRole = getDefaultRole(room.getConfig(), affiliation);

    if (log.isLoggable(Level.FINEST)) {
        log.finest("Occupant '" + nickname + "' <" + senderJID.toString() + "> is entering room "
                + room.getRoomJID() + " as role=" + newRole.name() + ", affiliation=" + affiliation.name());
    }
    room.addOccupantByJid(senderJID, nickname, newRole);
    ghostbuster.add(senderJID, room);

    Element pe = clonePresence(element);

    room.updatePresenceByJid(null, pe);
    // if (currentOccupantJid == null) {

    // Service Sends New Occupant's Presence to All Occupants
    // Service Sends New Occupant's Presence to New Occupant
    sendPresenceToAllOccupants(room, senderJID, roomCreated, null);
    // }

    Integer maxchars = null;
    Integer maxstanzas = null;
    Integer seconds = null;
    Date since = null;
    Element hist = (xElement == null) ? null : xElement.getChild("history");

    if (hist != null) {
        maxchars = toInteger(hist.getAttributeStaticStr("maxchars"), null);
        maxstanzas = toInteger(hist.getAttributeStaticStr("maxstanzas"), null);
        seconds = toInteger(hist.getAttributeStaticStr("seconds"), null);
        since = DateUtil.parse(hist.getAttributeStaticStr("since"));
    }
    sendHistoryToUser(room, senderJID, maxchars, maxstanzas, seconds, since, writer);
    if ((room.getSubject() != null) && (room.getSubjectChangerNick() != null)
            && (room.getSubjectChangeDate() != null)) {
        Element message = new Element(Message.ELEM_NAME,
                new String[] { Packet.TYPE_ATT, Packet.FROM_ATT, Packet.TO_ATT }, new String[] { "groupchat",
                        room.getRoomJID() + "/" + room.getSubjectChangerNick(), senderJID.toString() });

        message.addChild(new Element("subject", room.getSubject()));

        String stamp = DateUtil.formatDatetime(room.getSubjectChangeDate());
        Element delay = new Element("delay", new String[] { "xmlns", "stamp" },
                new String[] { "urn:xmpp:delay", stamp });

        delay.setAttribute("jid", room.getRoomJID() + "/" + room.getSubjectChangerNick());

        Element x = new Element("x", new String[] { "xmlns", "stamp" },
                new String[] { "jabber:x:delay", DateUtil.formatOld(room.getSubjectChangeDate()) });

        message.addChild(delay);
        message.addChild(x);
        writer.writeElement(message);
    }
    if (room.isRoomLocked()) {
        sendMucMessage(room, room.getOccupantsNickname(senderJID), "Room is locked. Please configure.");
    }
    if (roomCreated) {
        StringBuilder sb = new StringBuilder();

        sb.append("Welcome! You created new Multi User Chat Room.");
        if (room.isRoomLocked()) {
            sb.append(" Room is locked now. Configure it please!");
        } else if (lockNewRoom) {
            sb.append(" Room is unlocked and ready for occupants!");
        }
        sendMucMessage(room, room.getOccupantsNickname(senderJID), sb.toString());
    }
    if (room.getConfig().isLoggingEnabled()) {
        addJoinToHistory(room, new Date(), senderJID, nickname);
    }
    internalCountRoom(room.getRoomJID().toString());
}

From source file:org.apache.myfaces.application.ApplicationImpl.java

/**
 * @deprecated/*from   w w  w . j a v  a  2 s  . c o m*/
 */
@Deprecated
@Override
public final void setPropertyResolver(final PropertyResolver propertyResolver) {
    checkNull(propertyResolver, "propertyResolver");

    if (getFaceContext() != null) {
        throw new IllegalStateException("propertyResolver must be defined before request processing");
    }

    _runtimeConfig.setPropertyResolver(propertyResolver);

    if (log.isLoggable(Level.FINEST)) {
        log.finest("set PropertyResolver = " + propertyResolver.getClass().getName());
    }
}

From source file:com.google.enterprise.connector.sharepoint.spiimpl.SPDocument.java

/**
 * Return a set of metadata that are attached with this instance of
 * SPDocument. CM will then call findProperty for each metadata to construct
 * the feed for this document./*w ww  .  j a v a  2 s.  c  o  m*/
 */
@Override
public Set<String> getPropertyNames() throws RepositoryException {
    final Set<String> names = new HashSet<String>();
    ArrayList<String> candidates = new ArrayList<String>();
    if (!isEmptyDocument()) {
        candidates.add(SPConstants.OBJECT_TYPE);
        candidates.add(SPConstants.LIST_GUID);
        candidates.add(SPConstants.SPAUTHOR);
        candidates.add(SPConstants.PARENT_WEB_TITLE);
    }
    if (null != documentType) {
        names.add(SpiConstants.PROPNAME_DOCUMENTTYPE);
    }
    if (sharepointClientContext.isPushAcls()) {
        if (isMissingAcls()) {
            sharepointClientContext.logToFile(SPConstants.MISSING_ACL_URL_LOG,
                    "Document [" + this + "] is missing ACL.");
            LOGGER.log(Level.WARNING, "Missing ACL:Document [{0}] is missing ACL.", this);
        }
        names.add(SpiConstants.PROPNAME_ISPUBLIC);
        if (!isWebAppPolicyDoc()) {
            // For regular document parent Url should not be null.
            // empty parentUrl indicates error in ACL processing.
            // so no ACL related properties will be sent in this case.
            if (parentUrl != null) {
                if (feedType == FeedType.CONTENT_FEED) {
                    names.add(SpiConstants.PROPNAME_ACLINHERITFROM_DOCID);
                    names.add(SpiConstants.PROPNAME_ACLINHERITFROM_FEEDTYPE);
                } else {
                    names.add(SpiConstants.PROPNAME_ACLINHERITFROM);
                }
                names.add(SpiConstants.PROPNAME_ACLINHERITANCETYPE);
            }
        } else {
            // If document is web application policy document then ACL information
            // is available, as connector will not create 
            // partial web application policy document.
            names.add(SpiConstants.PROPNAME_ACLINHERITANCETYPE);
        }

        if (aclUsers != null) {
            names.add(SpiConstants.PROPNAME_ACLUSERS);
        }
        if (aclGroups != null) {
            names.add(SpiConstants.PROPNAME_ACLGROUPS);
        }
        if (aclDenyUsers != null) {
            names.add(SpiConstants.PROPNAME_ACLDENYUSERS);
        }
        if (aclDenyGroups != null) {
            names.add(SpiConstants.PROPNAME_ACLDENYGROUPS);
        }
    }
    if (!isEmptyDocument()) {
        // Add "extra" metadata fields, including those added by user to the
        // documentMetadata List for matching against patterns
        for (final Iterator<Attribute> iter = getAllAttrs().iterator(); iter.hasNext();) {
            final Attribute attr = iter.next();
            candidates.add(attr.getName().toString());
        }
        if (null != title) {
            names.add(SpiConstants.PROPNAME_TITLE);
        }
    }
    ArrayList<Pattern> excludedMetadataPatterns = sharepointClientContext.getExcluded_metadata();
    // Add only those metadata attributes which do not come under excluded
    // patterns
    if (sharepointClientContext.getExcluded_metadata().size() != 0) {
        for (String metadataName : candidates) {
            if (!matches(metadataName, excludedMetadataPatterns)) {
                names.add(metadataName);
            }
        }
    } else {
        names.addAll(candidates);
    }
    LOGGER.log(Level.FINEST,
            "Document properties set: " + names + " for docID [ " + docId + " ], docURL [ " + url + " ]. ");
    return names;
}

From source file:hudson.plugins.jobConfigHistory.FileHistoryDao.java

@Override
public void renameNode(Node node, String oldName, String newName) {
    final String onRenameDesc = " old name: " + oldName + ", new name: " + newName;
    if (historyRootDir != null) {
        //final File configFile = aItem.getConfigFile().getSlaveFile();
        final File currentHistoryDir = getHistoryDirForNode(node);
        final File historyParentDir = currentHistoryDir.getParentFile();
        final File oldHistoryDir = new File(historyParentDir, oldName);
        if (oldHistoryDir.exists()) {
            final FilePath fp = new FilePath(oldHistoryDir);
            // catch all exceptions so Hudson can continue with other rename tasks.
            try {
                fp.copyRecursiveTo(new FilePath(currentHistoryDir));
                fp.deleteRecursive();/*  w  ww .  j a v a  2  s  . c om*/
                LOG.log(Level.FINEST, "completed move of old history files on rename.{0}", onRenameDesc);
            } catch (IOException e) {
                final String ioExceptionStr = "unable to move old history on rename." + onRenameDesc;
                LOG.log(Level.SEVERE, ioExceptionStr, e);
            } catch (InterruptedException e) {
                final String irExceptionStr = "interrupted while moving old history on rename." + onRenameDesc;
                LOG.log(Level.WARNING, irExceptionStr, e);
            }
        }

    }
    final String content = Jenkins.XSTREAM2.toXML(node);
    createNewHistoryEntryAndSaveConfig(node, content, Messages.ConfigHistoryListenerHelper_RENAMED());
}

From source file:com.npower.dm.server.session.ManagementSessionHandler.java

/**
 * Called to permanently commit the synchronization. It does the following:
 * <ul>/*from  ww  w.j a  v  a2s  . c  o m*/
 *  <li>persists the <i>last</i> timestamp to the database for the sources
 *      successfully synchronized
 * </ul>
 */
public void commit() {
    sessionState.dmstate.end = new Date(System.currentTimeMillis());

    if (log.isLoggable(Level.FINEST)) {
        log.finest("Committing state: " + sessionState.dmstate);
    }

    engine.storeDeviceDMState(sessionState.dmstate);
}

From source file:com.ibm.iotf.client.AbstractClient.java

/**
 * Determine whether this device is currently connected to the IBM Watson Internet
 * of Things Platform./*from   ww  w  . j av a 2s . co  m*/
 * 
 * @return Whether the device is connected to the IBM Watson IoT Platform
 */
public boolean isConnected() {
    final String METHOD = "isConnected";
    boolean connected = false;
    if (mqttAsyncClient != null) {
        connected = mqttAsyncClient.isConnected();
    } else if (mqttClient != null) {
        connected = mqttClient.isConnected();
    }
    LoggerUtility.log(Level.FINEST, CLASS_NAME, METHOD, "Connected(" + connected + ")");
    return connected;
}