* Abstract method which will serve as method for sending messages with events.
* @param event event for which will be created and send message
*/
- public abstract void log(Event event);
+ public abstract void log(Event event) throws LBException;
/**
* Creates message prepared to send
*/
public void send(String keyStoreSender, String host,
int port, int timeout, String message)
- throws KeyStoreException,IOException,NoSuchAlgorithmException,KeyManagementException
+ throws LBException
+// throws KeyStoreException,IOException,NoSuchAlgorithmException,KeyManagementException
{
+ try {
SSL lbsock = new SSL();
lbsock.setProxy(keyStoreSender);
s.print(message + '\n' + '\0');
s.flush();
s.close();
+ }
+ catch (KeyStoreException e) {
+ throw new LBException(e);
+ }
+ catch (IOException e) {
+ throw new LBException(e);
+ }
+ catch (NoSuchAlgorithmException e) {
+ throw new LBException(e);
+ }
+ catch (KeyManagementException e) {
+ throw new LBException(e);
+ }
}
-
}