GigaSpaces XAP 7.0 API

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 net.jini.core.event.RemoteEvent
implements Externalizable, Cloneable

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

Version:
2.0
Author:
Igor Goldenberg
See Also:
NotifyDelegator, Serialized Form

Field Summary
protected  IJSpace _spaceProxy
          keep the local ref, incase the notify delegator listener was constructed as listener.
protected  String _templateUID
          multicast TemplateID, not for serialized stream.
 
Fields inherited from class net.jini.core.event.RemoteEvent
eventID, handback, seqNum, source
 
Constructor Summary
EntryArrivedRemoteEvent()
          Empty constructor.
EntryArrivedRemoteEvent(IJSpace source, long eventID, long seqNum, MarshalledObject handback, com.gigaspaces.internal.transport.IEntryPacket entryPacket, int notifyType, boolean fromReplication, String templateUID)
          Constructs a EntryArrivedRemoteEvent object.
EntryArrivedRemoteEvent(IJSpace source, long eventID, long seqNum, MarshalledObject handback, com.gigaspaces.internal.transport.IEntryPacket entryPacket, int notifyType, String templateUID)
           
 
Method Summary
 Object clone()
          Returns a shallow copy of this EntryArrivedRemoteEvent instance.
 net.jini.core.entry.Entry getEntry()
          Deprecated. use getObject() instead.
 net.jini.core.entry.Entry getEntry(boolean getExternalEntry)
          Deprecated. use getObject() or getExternalEntry() instead.
 com.gigaspaces.internal.transport.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.
 com.j_spaces.core.OperationID getOperationID()
           
 MarshalledObject getRegistrationObject()
          
 Object getSource()
          
 net.jini.id.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
protected  boolean isAcceptableByFilter(String filterID)
           
 boolean isFromReplication()
          is that specific event comes from prelication or not.
 void readExternal(ObjectInput in)
          
 void setSpaceProxy(IJSpace spaceProxy)
           
protected  void setSpaceProxyUuid(net.jini.id.Uuid spaceProxyUuid)
           
 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_templateUID

protected String _templateUID
multicast TemplateID, not for serialized stream.


_spaceProxy

protected transient IJSpace _spaceProxy
keep the local ref, incase the notify delegator listener was constructed as listener.

Constructor Detail

EntryArrivedRemoteEvent

public EntryArrivedRemoteEvent()
Empty constructor.


EntryArrivedRemoteEvent

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

EntryArrivedRemoteEvent

public EntryArrivedRemoteEvent(IJSpace source,
                               long eventID,
                               long seqNum,
                               MarshalledObject handback,
                               com.gigaspaces.internal.transport.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.gigaspaces.internal.transport.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

getOperationID

public com.j_spaces.core.OperationID getOperationID()

getSpaceUuid

public net.jini.id.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 net.jini.core.entry.UnusableEntryException
Returns the ExternalEntry that triggered the specified remote event.

Returns:
the ExternalEntry that arrived at the space.
Throws:
net.jini.core.entry.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 net.jini.core.entry.Entry getEntry(boolean getExternalEntry)
                                   throws net.jini.core.entry.UnusableEntryException
Deprecated. use getObject() or getExternalEntry() instead.

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:
net.jini.core.entry.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 net.jini.core.entry.Entry getEntry()
                                   throws net.jini.core.entry.UnusableEntryException
Deprecated. use getObject() instead.

Returns the entry by specification of user.

Returns:
the entry that arrived at the space.
Throws:
net.jini.core.entry.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 net.jini.core.entry.UnusableEntryException
Returns the entry by specification of user.

Returns:
the entry that arrived at the space.
Throws:
net.jini.core.entry.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 net.jini.core.event.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

setSpaceProxy

public void setSpaceProxy(IJSpace spaceProxy)

clone

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

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

setSpaceProxyUuid

protected void setSpaceProxyUuid(net.jini.id.Uuid spaceProxyUuid)

isAcceptableByFilter

protected boolean isAcceptableByFilter(String filterID)
Returns:
If this event was valid by filter, otherwise false.

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()

GigaSpaces XAP 7.0 API

Copyright © GigaSpaces.