com.j_spaces.core.client
Class EntryArrivedRemoteEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.jini.core.event.RemoteEvent
          extended by com.j_spaces.core.client.EntryArrivedRemoteEvent
All Implemented Interfaces:
Externalizable, Serializable, Cloneable

public class EntryArrivedRemoteEvent
extends RemoteEvent
implements Externalizable, Cloneable

An EntryArrivedRemoteEvent is sent to a NotifyDelegator object when an entry that matches the delegator's template enters a GigaSpace.

See Also:
NotifyDelegator, Serialized Form

Constructor Summary
EntryArrivedRemoteEvent()
          Empty constructor.
EntryArrivedRemoteEvent(IJSpace source, long eventID, long seqNum, MarshalledObject handback, com.j_spaces.core.IEntryPacket entryPacket, int notifyType, boolean fromReplication, String templateUID)
          Constructs a EntryArrivedRemoteEvent object.
EntryArrivedRemoteEvent(IJSpace source, long eventID, long seqNum, MarshalledObject handback, com.j_spaces.core.IEntryPacket entryPacket, int notifyType, String templateUID)
           
 
Method Summary
 Object clone()
          Returns a shallow copy of this EntryArrivedRemoteEvent instance.
 Entry getEntry()
          Deprecated. 
 Entry getEntry(boolean getExternalEntry)
          Deprecated. 
 com.j_spaces.core.IEntryPacket getEntryPacket()
          Returns an internal GigaSpaces structure to send/receive entries from the space.
 ExternalEntry getExternalEntry()
          Returns the ExternalEntry that triggered the specified remote event.
 String getKey()
           
 NotifyActionType getNotifyActionType()
          Returns a notify type of this event.
 int getNotifyType()
          Returns a notify type of this event.
 Object getObject()
          Returns the entry by specification of user.
 MarshalledObject getRegistrationObject()
          
 Object getSource()
          
 Uuid getSpaceUuid()
          Returns the unique uid of the space the event originated from.
 String getTemplateUID()
          returns multicast templateID, TODO remote this support after support TemplateID == NotifySpaceUID
 boolean isFromReplication()
          is that specific event comes from prelication or not.
 void readExternal(ObjectInput in)
          
 String toString()
           
 void writeExternal(ObjectOutput out)
          .
 
Methods inherited from class net.jini.core.event.RemoteEvent
getID, getSequenceNumber
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EntryArrivedRemoteEvent

public EntryArrivedRemoteEvent()
Empty constructor.


EntryArrivedRemoteEvent

public EntryArrivedRemoteEvent(IJSpace source,
                               long eventID,
                               long seqNum,
                               MarshalledObject handback,
                               com.j_spaces.core.IEntryPacket entryPacket,
                               int notifyType,
                               String templateUID)

EntryArrivedRemoteEvent

public EntryArrivedRemoteEvent(IJSpace source,
                               long eventID,
                               long seqNum,
                               MarshalledObject handback,
                               com.j_spaces.core.IEntryPacket entryPacket,
                               int notifyType,
                               boolean fromReplication,
                               String templateUID)
Constructs a EntryArrivedRemoteEvent object.

Parameters:
source - an Object representing the event source
eventID - a long containing the event identifier
seqNum - a long containing the event sequence number
handback - a MarshalledObject that was passed in as part of the original event registration.
entryPacket - an internal GigaSpaces structure to send/receive entries from the space.
notifyType - the type of the method that cause this notify. see NotifyModifiers
Method Detail

getEntryPacket

public com.j_spaces.core.IEntryPacket getEntryPacket()
Returns an internal GigaSpaces structure to send/receive entries from the space.

Returns:
the EntryPacket

getSource

public Object getSource()

Overrides:
getSource in class EventObject

getSpaceUuid

public Uuid getSpaceUuid()
Returns the unique uid of the space the event originated from.

Returns:
the unique uid of the space the event originated from.

getExternalEntry

public ExternalEntry getExternalEntry()
                               throws UnusableEntryException
Returns the ExternalEntry that triggered the specified remote event.

Returns:
the ExternalEntry that arrived at the space.
Throws:
UnusableEntryException - One or more fields in the entry cannot be deserialized, or the class for the entry type itself cannot be deserialized.

getEntry

@Deprecated
public Entry getEntry(boolean getExternalEntry)
               throws UnusableEntryException
Deprecated. 

Returns the entry/ExternalEntry that triggered the specified remote event.

Parameters:
getExternalEntry - if true this method will return ExternalEntry, otherwise Entry Object.
Returns:
the entry that arrived at the space.
Throws:
UnusableEntryException - One or more fields in the entry cannot be deserialized, or the class for the entry type itself cannot be deserialized.

getEntry

@Deprecated
public Entry getEntry()
               throws UnusableEntryException
Deprecated. 

Returns the entry by specification of user.

Returns:
the entry that arrived at the space.
Throws:
UnusableEntryException - One or more fields in the entry cannot be deserialized, or the class for the entry type itself cannot be deserialized.

getObject

public Object getObject()
                 throws UnusableEntryException
Returns the entry by specification of user.

Returns:
the entry that arrived at the space.
Throws:
UnusableEntryException - One or more fields in the entry cannot be deserialized, or the class for the entry type itself cannot be deserialized.

getNotifyType

public int getNotifyType()
Returns a notify type of this event.

Returns:
Returns a notify type of this event.

getNotifyActionType

public NotifyActionType getNotifyActionType()
Returns a notify type of this event.

Returns:
notify type of this event.
Since:
6.0

getRegistrationObject

public MarshalledObject getRegistrationObject()

Overrides:
getRegistrationObject in class RemoteEvent

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
.

Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException

Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

clone

public Object clone()
Returns a shallow copy of this EntryArrivedRemoteEvent instance.

Overrides:
clone in class Object
Returns:
A clone of this EntryArrivedRemoteEvent instance.

getTemplateUID

public String getTemplateUID()
returns multicast templateID, TODO remote this support after support TemplateID == NotifySpaceUID


toString

public String toString()
Overrides:
toString in class EventObject

isFromReplication

public boolean isFromReplication()
is that specific event comes from prelication or not.

Returns:

getKey

public String getKey()