net.sourceforge.obby4j
Enum Protocol.DocumentKeyword

java.lang.Object
  extended by java.lang.Enum<Protocol.DocumentKeyword>
      extended by net.sourceforge.obby4j.Protocol.DocumentKeyword
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Protocol.DocumentKeyword>
Enclosing class:
Protocol

public static enum Protocol.DocumentKeyword
extends java.lang.Enum<Protocol.DocumentKeyword>

A list of all subcommand keywords of the obby_document command known to this implementation of the obby protocol.

Parameters given here are appended behind the obby_document keyword, the document ID and the document keyword itself, i.e. obby_document:1 1:subscribe:2 would only have the "2" listed here as parameter.

See Also:
Keyword.obby_document

Enum Constant Summary
record
           Parameters by client: local opcount, remote opcount, "ins"|"del", contents
subscribe
          Parameters: user ID (TODO what is the client supposed to send here?)
sync_init
          Parameters: number of lines to be synced
sync_line
          Parameters: line contents, (start index, author user ID)+
unsubscribe
          Parameters: user ID (TODO what is the client supposed to send here?)
 
Method Summary
static Protocol.DocumentKeyword valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Protocol.DocumentKeyword[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

record

public static final Protocol.DocumentKeyword record

Parameters by client: local opcount, remote opcount, "ins"|"del", contents

Parameters by server: remote opcount, local opcount, "ins"|"del", contents

Send by both client and server. Note the reversed local/remote opcounts.


subscribe

public static final Protocol.DocumentKeyword subscribe
Parameters: user ID (TODO what is the client supposed to send here?)

Sent by both client and server.


sync_init

public static final Protocol.DocumentKeyword sync_init
Parameters: number of lines to be synced

Sent by server only.


sync_line

public static final Protocol.DocumentKeyword sync_line
Parameters: line contents, (start index, author user ID)+

Send by server only.


unsubscribe

public static final Protocol.DocumentKeyword unsubscribe
Parameters: user ID (TODO what is the client supposed to send here?)

Sent by both client and server.

Method Detail

valueOf

public static Protocol.DocumentKeyword valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

values

public static final Protocol.DocumentKeyword[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(Protocol.DocumentKeyword c : Protocol.DocumentKeyword.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared