'Encode a GNTP Registration Message
@return: GNTP Registration Message ready to be sent'

def encode(self):

    self.validate()
    SEP = u':    '
    EOL = u'\r\n'
    message = (self.format_info() + EOL)
    for (k, v) in self.headers.iteritems():
        message += (((k.encode('utf8') + SEP) + str(v).encode('utf8')) + EOL)
    if (len(self.notifications) > 0):
        for notice in self.notifications:
            message += EOL
            for (k, v) in notice.iteritems():
                message += (((k.encode('utf8') + SEP) + str(v).encode('utf8')) + EOL)
    message += EOL
    return message
