|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jdo.impl.fostore.AbstractRequest
Base implementation for all Request subtypes. Provides RequestId, and representation of Request types for all subclasses. Ergo, when you add a Request type you must add it's request type representation here.
Field Summary | |
protected FOStoreSchemaUID |
fsuid
uid corresponding to the same java.lang.Class that initializes jdoClass. |
protected org.apache.jdo.model.jdo.JDOClass |
jdoClass
Class meta data of the object represented by the constructor's given state manager |
protected static int |
LENGTH_COOKIE
|
private int |
lengthPos
|
(package private) static org.apache.commons.logging.Log |
logger
Logger |
protected static org.apache.jdo.util.I18NHelper |
msg
|
protected FOStoreOutput |
out
Stream to which request writes itself. |
protected FOStorePMF |
pmf
PersistenceManagerFactory via which request is being done. |
private RequestId |
requestId
|
private RequestType |
requestType
|
private boolean |
sealed
|
protected org.apache.jdo.state.StateManagerInternal |
sm
The state manager which is the subject of this request. |
Constructor Summary | |
protected |
AbstractRequest(Message m,
FOStorePMF pmf)
|
protected |
AbstractRequest(org.apache.jdo.state.StateManagerInternal sm,
Message m,
FOStorePMF pmf)
|
Method Summary | |
private void |
beginRequest()
Writes the header of the request. |
void |
doRequest()
Does whatever it is that the kind of request does in actually making a request of the store. |
protected abstract void |
doRequestBody()
Subclasses must implement in this method the actual writing of their Request type-specific data. |
private void |
endRequest()
Write the length. |
protected RequestId |
getId()
|
org.apache.jdo.state.StateManagerInternal |
getStateManager()
Get the StateManager associated with this request, null if none. |
void |
handleReply(Status status,
java.io.DataInput in,
int length)
Processes the results of the effect of the request in the store. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.apache.jdo.state.StateManagerInternal sm
protected final FOStorePMF pmf
protected final FOStoreOutput out
protected org.apache.jdo.model.jdo.JDOClass jdoClass
protected FOStoreSchemaUID fsuid
protected static final org.apache.jdo.util.I18NHelper msg
static final org.apache.commons.logging.Log logger
private int lengthPos
protected static final int LENGTH_COOKIE
private final RequestId requestId
private RequestType requestType
private boolean sealed
Constructor Detail |
protected AbstractRequest(org.apache.jdo.state.StateManagerInternal sm, Message m, FOStorePMF pmf)
protected AbstractRequest(Message m, FOStorePMF pmf)
Method Detail |
protected RequestId getId()
public final void doRequest() throws java.io.IOException
Request
doRequest
in interface Request
java.io.IOException
- in case of errors with the stream.Request.doRequest()
private final void beginRequest() throws java.io.IOException
request id
request type
length
No, we don't really know the length yet. We write out any old
integer, and then later (in endRequest) come back and write in the
real length.
java.io.IOException
protected abstract void doRequestBody() throws java.io.IOException
java.io.IOException
private final void endRequest() throws java.io.IOException
java.io.IOException
public org.apache.jdo.state.StateManagerInternal getStateManager()
getStateManager
in interface Request
public void handleReply(Status status, java.io.DataInput in, int length) throws java.io.IOException
in
- the input stream.length
- the length of data in the stream.status
- Indication as to the success, failure, etc. of the
request as handled by the store.
java.io.IOException
- if any problems reading the stream.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |