org.gcube.datatransfer.common.messaging
Class MSGClient
java.lang.Object
org.gcube.datatransfer.common.messaging.MSGClient
public class MSGClient
- extends Object
- Author:
- Andrea Manzi(CERN)
Field Summary |
org.slf4j.Logger |
logger
|
Method Summary |
String |
getDestination(org.gcube.common.core.monitoring.GCUBEMessage message)
|
String |
getSource(org.gcube.common.core.monitoring.GCUBEMessage message)
|
void |
sendMessage(org.gcube.common.core.contexts.GCUBEServiceContext context,
TransferMessage message,
org.gcube.common.core.scope.GCUBEScope... scope)
|
void |
sendRequestMessage(org.gcube.common.core.contexts.GCUBEServiceContext context,
TransferRequestMessage message,
org.gcube.common.core.scope.GCUBEScope... scope)
The method create Messages and send them to the D4science MessageBroker configured in the Infrastructure. |
void |
sendResponseMessage(org.gcube.common.core.contexts.GCUBEServiceContext context,
TransferResponseMessage message,
org.gcube.common.core.scope.GCUBEScope... scope)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
public org.slf4j.Logger logger
MSGClient
protected MSGClient()
throws IOException,
org.gcube.common.core.scope.GCUBEScopeNotSupportedException
- Throws:
IOException
org.gcube.common.core.scope.GCUBEScopeNotSupportedException
sendRequestMessage
public void sendRequestMessage(org.gcube.common.core.contexts.GCUBEServiceContext context,
TransferRequestMessage message,
org.gcube.common.core.scope.GCUBEScope... scope)
throws MSGClient.GHNClientModeException,
IllegalArgumentException,
Exception
- The method create Messages and send them to the D4science MessageBroker configured in the Infrastructure.
This method is intended to be executed by Service running on a GHN container.
The information about GCUBEScope, ServiceClass and ServiceName are automatically retrieved from the
ServiceContext.
By default a message for each service scope is generated, otherwise is it possible to specify the GCUBEScope as optional parameter.
- Parameters:
context
- the Service Contextmessage
- the map of parameters to sendscope,
- if the service is running in more than one scope and we want to specify the caller scope, is it possible to use this optional parameters
- Throws:
MSGClient.GHNClientModeException
- the Exception is thrown when the method is invoked from a client
ReservedFieldException
- if one or more parameters clash the ones already reserved by the system
IllegalArgumentException
- if one or more parameters type are not supported by the system
MSGClient.GHNClientModeException
Exception
sendResponseMessage
public void sendResponseMessage(org.gcube.common.core.contexts.GCUBEServiceContext context,
TransferResponseMessage message,
org.gcube.common.core.scope.GCUBEScope... scope)
throws MSGClient.GHNClientModeException,
IllegalArgumentException,
Exception
- Throws:
MSGClient.GHNClientModeException
IllegalArgumentException
Exception
sendMessage
public void sendMessage(org.gcube.common.core.contexts.GCUBEServiceContext context,
TransferMessage message,
org.gcube.common.core.scope.GCUBEScope... scope)
throws MSGClient.GHNClientModeException,
IllegalArgumentException,
Exception
- Throws:
MSGClient.GHNClientModeException
IllegalArgumentException
Exception
getSource
public String getSource(org.gcube.common.core.monitoring.GCUBEMessage message)
getDestination
public String getDestination(org.gcube.common.core.monitoring.GCUBEMessage message)
Copyright © 2014. All Rights Reserved.