/******************************************************************************* * gMix open source project - https://svs.informatik.uni-hamburg.de/gmix/ * Copyright (C) 2014 SVS * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. *******************************************************************************/ package userGeneratedContent.testbedPlugIns.layerPlugIns.layer2recodingScheme.RSA_AES_LossTolerantChannel_v0_001; import staticContent.framework.controller.Implementation; import staticContent.framework.interfaces.Layer1NetworkClient; import staticContent.framework.interfaces.Layer2RecodingSchemeClient; import staticContent.framework.interfaces.Layer3OutputStrategyClient; import staticContent.framework.interfaces.Layer4TransportClient; import staticContent.framework.message.Reply; import staticContent.framework.message.Request; public class ClientPlugIn extends Implementation implements Layer2RecodingSchemeClient { private RSA_AES_LossTolerantChannel_Config config; private RSA_AES_LossTolerantChannel messageCreator; @Override public void constructor() { this.config = new RSA_AES_LossTolerantChannel_Config(anonNode, true); this.messageCreator = new RSA_AES_LossTolerantChannel(anonNode, config); this.messageCreator.initAsClient(); } @Override public void initialize() { } @Override public void begin() { } @Override public void setReferences( Layer1NetworkClient layer1, Layer2RecodingSchemeClient layer2, Layer3OutputStrategyClient layer3, Layer4TransportClient layer4) { assert layer2 == this; } @Override public Request applyLayeredEncryption(Request request) { return messageCreator.applyLayeredEncryption(request); } @Override public int getMaxPayloadForNextMessage() { return messageCreator.getMaxPayloadForNextMessage(); } @Override public int getMaxPayloadForNextReply() { return messageCreator.getMaxPayloadForNextReply(); } @Override public Reply extractPayload(Reply reply) { return messageCreator.extractPayload(reply); } }