コード例 #1
0
ファイル: request_async.cs プロジェクト: barbaroony/GMSEC_API
 public override void OnEvent(ConnectionManager connMgr, Status status, Connection.ConnectionEvent connEvent)
 {
     if (status.IsError())
     {
         Log.Error("[ExampleReplyCallback::OnEvent] " + status.Get() + ", event=" + connEvent);
     }
 }
コード例 #2
0
    public override void OnEvent(ConnectionManager connMgr, Status status, Connection.ConnectionEvent connEvent)
    {
        // Print the status of publish operations.  This includes counts
        // for successes, warnings, and errors.
        Log.Info(status.GetReason());

        if (status.IsError())
        {
            Log.Error("The first occurrence of a WebSphere MQ Asynchronous Put Response warning or failure returned the WebSphere Reason Code: " + status.GetCustomCode());
        }

        EventFired = true;
    }
コード例 #3
0
ファイル: connection_state.cs プロジェクト: nasa/GMSEC_API
 public override void OnEvent(ConnectionManager connMgr, Status status, Connection.ConnectionEvent connEvent)
 {
     // Perform some action based on the type of event that occurred
     if (connEvent == Connection.ConnectionEvent.CONNECTION_SUCCESSFUL_EVENT)
     {
         Log.Info("Connected to the middleware server");
     }
     else if (connEvent == Connection.ConnectionEvent.CONNECTION_BROKEN_EVENT)
     {
         Log.Info("Connection to the middleware lost or terminated");
     }
     else if (connEvent == Connection.ConnectionEvent.CONNECTION_RECONNECT_EVENT)
     {
         Log.Info("Attempting to reestablish the connection to the middleware");
     }
 }
コード例 #4
0
    public override void OnEvent(ConnectionManager connMgr, Status status, Connection.ConnectionEvent connEvent)
    {
        switch (connEvent)
        {
        case Connection.ConnectionEvent.CONNECTION_SUCCESSFUL_EVENT:
            Log.Info("[OnEvent]: Connected to the middleware server");
            break;

        case Connection.ConnectionEvent.CONNECTION_BROKEN_EVENT:
            Log.Info("[OnEvent]: Connection to the middleware lost or terminated");
            break;

        case Connection.ConnectionEvent.CONNECTION_RECONNECT_EVENT:
            Log.Info("[OnEvent]: Attempting to reestablish the connection to the middleware");
            break;

        default:
            Log.Info("[OnEvent]: " + status.Get());
            break;
        }
    }