org.psepr.jClient
Class SendOneEvent

java.lang.Object
  extended by org.psepr.jClient.SendOneEvent

public class SendOneEvent
extends java.lang.Object

Routines for sending one event. This does not set up a jabber connection since that takes a handshake. A connection is made to the server's OneEvent interface and the event is sent.

The process is to create a PsEPREvent and send it. The authentication is sent with the event. Additionally, there is no response on whether the authentication is accepted or whether the event is well formed so, it is suggested, that you test things out with a regular lease connection. An event that doesn't work will just be thrown away by this interface with no indication of failure.

The calling sequence is:

     SendOneEvent soe = new SendOneEvent();
     PsEPREvent pe = new PsEPREvent();
     PsEPRServiceIdentity id = new PsEPRServiceIdentity(service, password);
     pe.setChannel(channel);
     ... initialize the PsEPREvent
     soe.sendOneEvent(id, pe);
 

Author:
Robert.Adams@intel.com

Constructor Summary
SendOneEvent()
           
 
Method Summary
 boolean sendOneEvent(PsEPRServiceIdentity ident, PsEPREvent pe)
          Send the passed event using the simple password authentication.
 boolean sendOneEvent(java.lang.String service, java.lang.String password, PsEPREvent pe)
          Deprecated.  
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SendOneEvent

public SendOneEvent()
Method Detail

sendOneEvent

public boolean sendOneEvent(PsEPRServiceIdentity ident,
                            PsEPREvent pe)
Send the passed event using the simple password authentication.

Parameters:
service - name of the service to send the event as
password - password to log in as
pe - the event to send
Returns:

sendOneEvent

public boolean sendOneEvent(java.lang.String service,
                            java.lang.String password,
                            PsEPREvent pe)
Deprecated. 

Send the passed event using the simple password authentication.

Parameters:
service - name of the service to send the event as
password - password to log in as
pe - the event to send
Returns: