Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/0.0.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
fbraem committed Oct 30, 2013
2 parents 9a1b8bb + d322767 commit 6423f63
Show file tree
Hide file tree
Showing 240 changed files with 23,768 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/bin/
/build/
31 changes: 31 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
0.0.8
- Solve bug #4 Chars shift on messagecontroller.
- Show EBCDIC/ASCII in message hex view
- Create a dashboard page
- Channel / Channelstatus page

0.0.7
- Can connect in client mode
- Add support for channels
- IP's can be denied/allowed
- Use Poco 1.5
- JSON module was donated to POCO, so we use that one.
- Support for z/OS
- ASCII / EBCDIC view of messages

0.0.6

- Use own JSON classes
- Make a first binary for Linux i686 available

0.0.5

- Maintenance Release

0.0.4

- Show message in hex using jQuery/Fancybox

0.0.3

- Resolve 2219 (MQRC_CALL_IN_PROGRESS): Protect all MQI calls with a global mutex
35 changes: 35 additions & 0 deletions MQ/include/MQ/Buffer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright 2010 MQWeb - Franky Braem
*
* Licensed under the EUPL, Version 1.1 or – as soon they
* will be approved by the European Commission - subsequent
* versions of the EUPL (the "Licence");
* You may not use this work except in compliance with the
* Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in
* writing, software distributed under the Licence is
* distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied.
* See the Licence for the specific language governing
* permissions and limitations under the Licence.
*/

#ifndef _MQ_Buffer_h
#define _MQ_Buffer_h

#include "Poco/Buffer.h"
#include "Poco/SharedPtr.h"

namespace MQ {

typedef Poco::Buffer<unsigned char> Buffer;
typedef Poco::SharedPtr<Buffer> BufferPtr;

} // namespace MQ

#endif // _MQ_Buffer_h
74 changes: 74 additions & 0 deletions MQ/include/MQ/CommandServer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/*
* Copyright 2010 MQWeb - Franky Braem
*
* Licensed under the EUPL, Version 1.1 or – as soon they
* will be approved by the European Commission - subsequent
* versions of the EUPL (the "Licence");
* You may not use this work except in compliance with the
* Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in
* writing, software distributed under the Licence is
* distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied.
* See the Licence for the specific language governing
* permissions and limitations under the Licence.
*/

#ifndef _MQ_CommandServer_h
#define _MQ_CommandServer_h

#include <cmqc.h>
#include <vector>

#include <MQ/QueueManager.h>
#include <MQ/Queue.h>
#include <MQ/PCF.h>

#include <Poco/SharedPtr.h>

namespace MQ {

class CommandServer
/// Class for sending PCF commands to a queuemanager
{
public:
CommandServer(QueueManager::Ptr qmgr, const std::string& modelQueue);
/// Constructor.

PCF::Ptr createCommand(MQLONG command) const;
/// Returns a shared pointer to a PCF object for the given command.

void sendCommand(PCF::Ptr& command, PCF::Vector& response);
/// Sends the command to the queuemanager. The response is returned
/// as a vector of PCF objects. Can throw a MQException.

const QueueManager& qmgr() const;
/// Returns the associated queuemanager


typedef Poco::SharedPtr<CommandServer> Ptr;


private:
QueueManager::Ptr _qmgr;

Queue _commandQ;

Queue _replyQ;
};


inline const QueueManager& CommandServer::qmgr() const
{
poco_assert_dbg(!_qmgr.isNull()); // Can't be null
return *_qmgr.get();
}

} // namespace MQ

#endif // _MQ_CommandServer_h
105 changes: 105 additions & 0 deletions MQ/include/MQ/MQException.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
/*
* Copyright 2010 MQWeb - Franky Braem
*
* Licensed under the EUPL, Version 1.1 or – as soon they
* will be approved by the European Commission - subsequent
* versions of the EUPL (the "Licence");
* You may not use this work except in compliance with the
* Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in
* writing, software distributed under the Licence is
* distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied.
* See the Licence for the specific language governing
* permissions and limitations under the Licence.
*/

#ifndef _MQ_MQException_h
#define _MQ_MQException_h

#include <string>

#include <Poco/Logger.h>

namespace MQ {

class MQException : public Poco::Exception
/// Exception thrown when there is a problem with Websphere MQ
{
public:
MQException(const std::string& object, const std::string& function, long code, long reason);
/// Constructor

virtual ~MQException() throw() { }
/// Destructor

void object(const std::string& object);
/// Sets the Websphere MQ object related with this exception.

std::string object() const;
/// If known, it returns the Websphere MQ object related with this exception.

std::string function() const;
/// Returns the Websphere MQ function that resulted in this exception (MQPUT, MQGET, ...)

long code() const;
/// Returns the completion code of the last executed Websphere MQ function.

long reason() const;
/// Returns the reason code of the last executed Websphere MQ function.


void log(Poco::Logger& logger) const;
/// Log this exception to the given logger

virtual const char* name() const throw();


virtual const char* what() const throw();

private:
std::string _object;

std::string _function;

long _code;

long _reason;

};


inline void MQException::object(const std::string& object)
{
_object = object;
}

inline std::string MQException::object() const
{
return _object;
}


inline std::string MQException::function() const
{
return _function;
}

inline long MQException::code() const
{
return _code;
}

inline long MQException::reason() const
{
return _reason;
}

} // namespace MQ

#endif // _MQ_MQException_h
Loading

0 comments on commit 6423f63

Please sign in to comment.