org.apache.jdo.impl.fostore
Class RequestType

java.lang.Object
  extended byorg.apache.jdo.impl.fostore.RequestType

class RequestType
extends java.lang.Object

Represents a kind of Request. Used to identify request types between client and store; a smaller representation than a Request's java.lang.Class.

Author:
Dave Bristor

Field Summary
private static java.util.HashMap debug
           
private  java.lang.Integer id
           
private static int nextType
           
private static java.util.HashMap requestHandlers
           
private static java.util.HashMap requestTypes
           
 
Constructor Summary
(package private) RequestType(java.io.DataInput in)
           
(package private) RequestType(int id, java.lang.Class requestClass, RequestHandler.HandlerFactory factory)
           
 
Method Summary
 boolean equals(java.lang.Object other)
           
(package private) static RequestType get(java.lang.Class cls)
           
(package private)  RequestHandler.HandlerFactory getHandlerFactory()
           
 int hashCode()
           
 java.lang.String toString()
           
(package private)  void write(java.io.DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

id

private final java.lang.Integer id

requestTypes

private static java.util.HashMap requestTypes

requestHandlers

private static java.util.HashMap requestHandlers

debug

private static java.util.HashMap debug

nextType

private static int nextType
Constructor Detail

RequestType

RequestType(int id,
            java.lang.Class requestClass,
            RequestHandler.HandlerFactory factory)

RequestType

RequestType(java.io.DataInput in)
      throws java.io.IOException
Method Detail

write

void write(java.io.DataOutput out)
     throws java.io.IOException
Throws:
java.io.IOException

get

static RequestType get(java.lang.Class cls)
Returns:
The RequestType corresponding to the given class.

hashCode

public int hashCode()

equals

public boolean equals(java.lang.Object other)

getHandlerFactory

RequestHandler.HandlerFactory getHandlerFactory()
Returns:
The factory that can create a RequestHandler corresponding to our request type.

toString

public java.lang.String toString()