public PubSubService getService()
    {
        if ( service == null ) {
            if (getUniqueIdentifier().getServiceIdentifier().equals( XMPPServer.getInstance().getPubSubModule().getUniqueIdentifier() ) ) {
                service = XMPPServer.getInstance().getPubSubModule();
            } else {
                final PEPServiceManager serviceMgr = XMPPServer.getInstance().getIQPEPHandler().getServiceManager();
                service = serviceMgr.getPEPService(getUniqueIdentifier().getServiceIdentifier(), false);
            }
        }
        return service;
    }
Returns the {@link PubSubService} to which this node belongs.

@return the pubsub service.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/Node.java