sashenka.servlet
Interface IRCServletRequest

All Superinterfaces:
javax.servlet.ServletRequest

public interface IRCServletRequest
extends javax.servlet.ServletRequest


Field Summary
static int IRC_ACTION_TYPE
           
static int IRC_CTCP_TYPE
           
static int IRC_HELP_REQUEST_TYPE
           
static int IRC_IDLE_CHANNEL_TYPE
           
static int IRC_NOTICE_TYPE
           
static int IRC_PRIVMSG_TYPE
           
 
Method Summary
 java.lang.String getCommand()
          Get the command as sent by the server.
 Destination getDestination()
          Get the destination that this request was routed to.
 java.util.Collection getDestinations()
          Get the collection of recipients this message was sent to.
 java.lang.String getMessage()
          Get the text of the message that was sent.
 java.util.List getMessageTokens()
          Get the text of the message that was sent in tokenized string form.
 java.util.List getParameters()
          Get all the parameters to this request as a Collection of Strings.
 java.lang.String getPrefix()
          Get the prefix to this request as sent by the server.
 IRCSession getSession()
          Get the session associated with this request.
 Source getSource()
          Returns the source of the message.
 int getType()
           
 boolean toMe()
          This returns whether or not the request was directed at the bot runtime directly (ie a direct privmsg or public salutation).
 boolean toMe(boolean publicToo)
          This returns whether or not the request was directed at the bot runtime directly (ie a direct privmsg) with the boolean indicating you want public requests as well.
 boolean toMePrivate()
           
 boolean toMePublic()
           
 
Methods inherited from interface javax.servlet.ServletRequest
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocale, getLocales, getParameter, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute
 

Field Detail

IRC_PRIVMSG_TYPE

public static final int IRC_PRIVMSG_TYPE
See Also:
Constant Field Values

IRC_HELP_REQUEST_TYPE

public static final int IRC_HELP_REQUEST_TYPE
See Also:
Constant Field Values

IRC_IDLE_CHANNEL_TYPE

public static final int IRC_IDLE_CHANNEL_TYPE
See Also:
Constant Field Values

IRC_NOTICE_TYPE

public static final int IRC_NOTICE_TYPE
See Also:
Constant Field Values

IRC_ACTION_TYPE

public static final int IRC_ACTION_TYPE
See Also:
Constant Field Values

IRC_CTCP_TYPE

public static final int IRC_CTCP_TYPE
See Also:
Constant Field Values
Method Detail

getSource

public Source getSource()
Returns the source of the message. Typically is a User, but may be a server as well.


getDestinations

public java.util.Collection getDestinations()
Get the collection of recipients this message was sent to.


getDestination

public Destination getDestination()
Get the destination that this request was routed to. This is the specific destination via which this request was created.


getMessage

public java.lang.String getMessage()
Get the text of the message that was sent.


getMessageTokens

public java.util.List getMessageTokens()
Get the text of the message that was sent in tokenized string form.


getCommand

public java.lang.String getCommand()
Get the command as sent by the server.


getPrefix

public java.lang.String getPrefix()
Get the prefix to this request as sent by the server.


getParameters

public java.util.List getParameters()
Get all the parameters to this request as a Collection of Strings.


getSession

public IRCSession getSession()
Get the session associated with this request. Sessions are messy business in IRC and unreliable.


toMe

public boolean toMe()
This returns whether or not the request was directed at the bot runtime directly (ie a direct privmsg or public salutation).


toMePublic

public boolean toMePublic()

toMePrivate

public boolean toMePrivate()

toMe

public boolean toMe(boolean publicToo)
This returns whether or not the request was directed at the bot runtime directly (ie a direct privmsg) with the boolean indicating you want public requests as well. Public requests are ones that begin with the bots name.


getType

public int getType()