public class JdbcSender extends AbstractSender
Constructor and Description |
---|
JdbcSender() |
Modifier and Type | Method and Description |
---|---|
void |
doClose() |
void |
doInit(Properties messageAttributes) |
Serializable |
doSend(Message message,
MeasurementUnit measurementUnit)
Actually performs the send operation.
|
String |
getDriverClass()
Gets the JDBC driver class.
|
String |
getJdbcUrl()
Gets the JDBC URL.
|
String |
getPassword()
Gets the JDBC password.
|
String |
getUsername()
Gets the JDBC username.
|
void |
postSend(Message message)
Performs any action that needs to be done to complete the sending of the message but is not directly related to the sending operation and thus not measured.
|
void |
preSend(Message message,
Properties messageAttributes)
Performs any action that needs to be done to send the message but is not directly related to the sending operation and thus not measured.
|
JdbcSender |
setDriverClass(String driverClass)
Sets the JDBC driver class.
|
JdbcSender |
setJdbcUrl(String jdbcUrl)
Sets the JDBC URL.
|
JdbcSender |
setPassword(String password)
Sets the JDBC password.
|
JdbcSender |
setUsername(String username)
Sets the JDBC username.
|
close, getTarget, getTarget, init, isKeepConnection, safeGetTarget, send, setKeepConnection, setTarget
public void doInit(Properties messageAttributes) throws PerfCakeException
doInit
in class AbstractSender
PerfCakeException
public void doClose()
doClose
in class AbstractSender
public void preSend(Message message, Properties messageAttributes) throws Exception
MessageSender
preSend
in interface MessageSender
preSend
in class AbstractSender
message
- Message to be sent.messageAttributes
- Attributes that can be used to replace placeholders in message and or target.Exception
- In case anything fails during the preparation.public Serializable doSend(Message message, MeasurementUnit measurementUnit) throws Exception
AbstractSender
doSend
in class AbstractSender
message
- Message to be sent.measurementUnit
- Measurement unit carrying the current stop-watch.Exception
- When the sending operation failed.MessageSender.send(org.perfcake.message.Message, org.perfcake.reporting.MeasurementUnit)
public void postSend(Message message) throws Exception
MessageSender
postSend
in interface MessageSender
postSend
in class AbstractSender
message
- Message that was sent.Exception
- In case anything fails during the finalization.public String getJdbcUrl()
public JdbcSender setJdbcUrl(String jdbcUrl)
jdbcUrl
- The JDBC URL.public String getDriverClass()
public JdbcSender setDriverClass(String driverClass)
driverClass
- The JDBC driver class.public String getUsername()
public JdbcSender setUsername(String username)
username
- The JDBC username.public String getPassword()
public JdbcSender setPassword(String password)
password
- The JDBC password.Copyright © 2010–2017 PerfCake Community. All rights reserved.