ByteArrayOutputStream bos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(bos);
MembershipCleanerMessage.serializer().serialize(mcMessage, dos);
/* Construct the token update message to be sent */
Message mbrshipCleanerMessage = new Message( new EndPoint(FBUtilities.getHostName(), port_), "", StorageService.mbrshipCleanerVerbHandler_, new Object[]{bos.toByteArray()} );
BufferedReader bufReader = new BufferedReader( new InputStreamReader( new FileInputStream(file) ) );
String line = null;
while ( ( line = bufReader.readLine() ) != null )
{
mbrshipCleanerMessage.addHeader(line, line.getBytes());
}
System.out.println("Sending a membership clean message to " + target);
MessagingService.getMessagingInstance().sendOneWay(mbrshipCleanerMessage, target);
Thread.sleep(MembershipCleaner.waitTime_);