org.iperg.part.core
Class IpProcessEvent

java.lang.Object
  extended by org.iperg.part.core.IpEvent
      extended by org.iperg.part.core.IpProcessEvent

public class IpProcessEvent
extends IpEvent

The IpProcessEvent class describes events that concern remote processes, for instances the establishment of a new connection between the local and some remote process.

Version:
1.0.0 Initial version
Author:
Olov Stahl - olovs@sics.se

Field Summary
static java.lang.String CONNECT_RETRY_FAILED
          Process event sub-type that indicates that a connection that was attempted from the local process failed.
static java.lang.String CONNECTION_ESTABLISHED
          Process event sub-type that indicates that a connection has been set up between the local and a remote process.
static java.lang.String CONNECTION_TERMINATED
          Process event sub-type that indicates that a connection to a remote process has been terminated The reason may be for instance that the connection was closed by one of the processes, or broken due to some network error.
static java.lang.String PROCESS_ALIVE
          Process event sub-type that indicates that a certain remote process seems to be alive.
static java.lang.String PROCESS_EXIT
          Process event sub-type that indicates that a certain remote process has exited.
static java.lang.String PROCESS_SILENT
          Process event sub-type that indicates that the local process has not received any data from the remote process in a while.
 
Method Summary
 java.lang.Exception getException()
          If event type is CONNECTION_FAILED, returns the local exception that caused the call to connect to fail.
 IpIdentifier getProcessId()
          Get the identifier of the remote process that the event concerns.
 IpUrl getUrl()
          Get the connection url
 
Methods inherited from class org.iperg.part.core.IpEvent
getDestination, getType, read, setDestination, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONNECTION_ESTABLISHED

public static final java.lang.String CONNECTION_ESTABLISHED
Process event sub-type that indicates that a connection has been set up between the local and a remote process.

See Also:
Constant Field Values

CONNECTION_TERMINATED

public static final java.lang.String CONNECTION_TERMINATED
Process event sub-type that indicates that a connection to a remote process has been terminated The reason may be for instance that the connection was closed by one of the processes, or broken due to some network error.

See Also:
Constant Field Values

CONNECT_RETRY_FAILED

public static final java.lang.String CONNECT_RETRY_FAILED
Process event sub-type that indicates that a connection that was attempted from the local process failed. Such events are only generated when connections are persistent, and when a re-connect fails. I.e., events of this type are NOT generated if the first connect fails, no matter if the connection is persistent or not.

See Also:
Constant Field Values

PROCESS_SILENT

public static final java.lang.String PROCESS_SILENT
Process event sub-type that indicates that the local process has not received any data from the remote process in a while.

See Also:
Constant Field Values

PROCESS_ALIVE

public static final java.lang.String PROCESS_ALIVE
Process event sub-type that indicates that a certain remote process seems to be alive. Events of this type are only posted once as a result of receiving data, and only if a PROCESS_SILENT event was previously posted concerning the corresponding process.

See Also:
Constant Field Values

PROCESS_EXIT

public static final java.lang.String PROCESS_EXIT
Process event sub-type that indicates that a certain remote process has exited. Will only be generated if the remote process is directly connected to the local process.

See Also:
Constant Field Values
Method Detail

getProcessId

public IpIdentifier getProcessId()
Get the identifier of the remote process that the event concerns.

If the event sub-type is CONNECTION_ESTABLISHED, the identifier identifies the process to which the local process is now connected.

If the event sub-type is CONNECTION_FAILED, the identifier will be null.

If the event sub-type is CONNECTION_TERMINATED, the identifier identifies the process at the other end of the terminated connection.

If the event sub-type is PROCESS_SILENCE, the identifier identifies the process which seems to be silent.

If the event sub-type is PROCESS_ALIVE, the identifier identifies the process which seems to be alive.

If the event sub-type is PROCESS_EXIT, the identifier identifies the process that is no longer running.

Returns:
The identifier of the remote process that the event concerns

getUrl

public IpUrl getUrl()
Get the connection url


getException

public java.lang.Exception getException()
If event type is CONNECTION_FAILED, returns the local exception that caused the call to connect to fail.

Returns:
The connect exception