Class DefaultConnectorAttachment
- java.lang.Object
-
- io.gridgo.core.support.subscription.impl.DefaultConnectorAttachment
-
- All Implemented Interfaces:
ConnectorAttachment
public class DefaultConnectorAttachment extends java.lang.Object implements ConnectorAttachment
-
-
Constructor Summary
Constructors Constructor Description DefaultConnectorAttachment(GatewaySubscription gateway, io.gridgo.connector.Connector connector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GatewaySubscription
finishAttaching()
Finish subscribing this connector.io.gridgo.connector.Connector
getConnector()
GatewaySubscription
getGateway()
MessageTransformer
getIncomingTransformer()
MessageTransformer
getOutgoingTransformer()
ConnectorAttachment
transformIncomingWith(MessageTransformer transformer)
Attach a MessageTransformer to this connector when transform incoming messages.ConnectorAttachment
transformOutgoingWith(MessageTransformer transformer)
Attach a MessageTransformer to this connector when transform outgoing messages.
-
-
-
Constructor Detail
-
DefaultConnectorAttachment
public DefaultConnectorAttachment(GatewaySubscription gateway, io.gridgo.connector.Connector connector)
-
-
Method Detail
-
transformIncomingWith
public ConnectorAttachment transformIncomingWith(MessageTransformer transformer)
Description copied from interface:ConnectorAttachment
Attach a MessageTransformer to this connector when transform incoming messages.- Specified by:
transformIncomingWith
in interfaceConnectorAttachment
- Parameters:
transformer
- the transformer- Returns:
- this ConnectorSubscription
-
transformOutgoingWith
public ConnectorAttachment transformOutgoingWith(MessageTransformer transformer)
Description copied from interface:ConnectorAttachment
Attach a MessageTransformer to this connector when transform outgoing messages.- Specified by:
transformOutgoingWith
in interfaceConnectorAttachment
- Parameters:
transformer
- the transformer- Returns:
- this ConnectorSubscription
-
finishAttaching
public GatewaySubscription finishAttaching()
Description copied from interface:ConnectorAttachment
Finish subscribing this connector.- Specified by:
finishAttaching
in interfaceConnectorAttachment
- Returns:
- the GatewaySubscription which this connector is attached
-
getGateway
public GatewaySubscription getGateway()
-
getConnector
public io.gridgo.connector.Connector getConnector()
- Specified by:
getConnector
in interfaceConnectorAttachment
-
getIncomingTransformer
public MessageTransformer getIncomingTransformer()
- Specified by:
getIncomingTransformer
in interfaceConnectorAttachment
-
getOutgoingTransformer
public MessageTransformer getOutgoingTransformer()
- Specified by:
getOutgoingTransformer
in interfaceConnectorAttachment
-
-