|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectthinkmap.datasource.util.FilterEntityHandler
public abstract class FilterEntityHandler
FilterEntityHandler provides an implementation of IEntityHandler where all methods simply call through to another handler. Useful if your handler is only interested in one or two messages.
| Field Summary | |
|---|---|
protected IEntityHandler |
underlyingHandler
|
| Fields inherited from interface thinkmap.datasource.IEntityHandler |
|---|
ADD_REQUEST, ATTR_CACHE_REVISION, DELETE_REQUEST, EDGE, ENTITY_REQUEST, FLAG_NO_CACHE, FLAGS, FLAGS_DEFAULT, ID_REQUEST, LIST_ENTITIES_REQUEST, METADATA_REQUEST, NODE, NULL_REQUEST, QUERY_MAX_RESULTS, QUERY_STARTING_RESULT_NUMBER, QUERY_STRING, RELATED_REQUEST, RESERVED_ID_MAX, SINK, SOURCE, TOTAL_RESULTS, UNLIMITED_RESULTS, UPDATE_REQUEST |
| Constructor Summary | |
|---|---|
FilterEntityHandler(IEntityHandler underlyingHandler)
Creates a new FilterEntityHandler object. |
|
| Method Summary | |
|---|---|
void |
attribute(String name,
Object value)
Send a message attribute. |
void |
beginEntity()
Begin an entity. |
void |
beginEntityMD(String parentType)
Begin entity metadata. |
void |
beginId(String entityType)
Begin an entity ID. |
void |
beginMessage(int messageType)
Begin a message. |
void |
beginRelatedEntity(String propertyName,
boolean reciprocal)
A related entity. |
void |
beginRelatedList(byte i)
Begin the list of related entities. |
void |
endEntity()
End an entity. |
void |
endEntityMD()
End entity metadata. |
void |
endId()
End an entity ID. |
void |
endMessage()
End a message. |
void |
endRelatedEntity()
End a related entity. |
void |
endRelatedList()
Mark the end of a related list. |
void |
error(Exception e)
Tell the entity source about an error. |
void |
fatalError(Exception e)
A fatal error occured. |
void |
idKey(Object o)
Send an id key. |
void |
idKeyMD(Class o)
Describe an entity id's key. |
void |
property(String name,
Object value)
Send an entity's property. |
void |
propertyMD(String name,
Class type)
Describe an entity's property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected IEntityHandler underlyingHandler
| Constructor Detail |
|---|
public FilterEntityHandler(IEntityHandler underlyingHandler)
underlyingHandler - IEntityHandler to be filtered| Method Detail |
|---|
public void beginMessage(int messageType)
IEntityHandler
beginMessage in interface IEntityHandlermessageType - one of the request types below, eg RELATED_REQUEST
public void attribute(String name,
Object value)
IEntityHandler
attribute in interface IEntityHandlername - The attribute's namevalue - The attribute's valuepublic void beginEntity()
IEntityHandler
beginEntity in interface IEntityHandlerpublic void endEntity()
IEntityHandler
endEntity in interface IEntityHandlerpublic void beginEntityMD(String parentType)
IEntityHandler
beginEntityMD in interface IEntityHandlerparentType - The parent type of this entity, eg NODE or EDGE.public void endEntityMD()
IEntityHandler
endEntityMD in interface IEntityHandler
public void property(String name,
Object value)
IEntityHandler
property in interface IEntityHandler
public void propertyMD(String name,
Class type)
IEntityHandler
propertyMD in interface IEntityHandlerpublic void beginId(String entityType)
IEntityHandler
beginId in interface IEntityHandlerentityType - The type of entity being sent.public void endId()
IEntityHandler
endId in interface IEntityHandlerpublic void idKey(Object o)
IEntityHandler
idKey in interface IEntityHandlero - A key in an entity ID.public void idKeyMD(Class o)
IEntityHandler
idKeyMD in interface IEntityHandlero - Describe an entity ID's key.public void beginRelatedList(byte i)
IEntityHandler
beginRelatedList in interface IEntityHandleri - one of: FLAGS_DEFAULT, FLAG_NO_CACHEpublic void endRelatedList()
IEntityHandler
endRelatedList in interface IEntityHandler
public void beginRelatedEntity(String propertyName,
boolean reciprocal)
IEntityHandler
beginRelatedEntity in interface IEntityHandlerpropertyName - either SOURCE or SINK.reciprocal - should this connection go both ways? SOURCE should
always be reciprocal, and SINK should be reciprocal for a
bidirectional edge.public void endRelatedEntity()
IEntityHandler
endRelatedEntity in interface IEntityHandlerpublic void endMessage()
IEntityHandler
endMessage in interface IEntityHandlerpublic void error(Exception e)
IEntityHandler
error in interface IEntityHandlere - The cause.public void fatalError(Exception e)
IEntityHandler
fatalError in interface IEntityHandlere - The cause.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||