1 24 25 package org.objectweb.dream.channel; 26 27 import java.io.IOException ; 28 29 import org.objectweb.dream.AbstractComponent; 30 import org.objectweb.fractal.api.NoSuchInterfaceException; 31 import org.objectweb.fractal.api.control.IllegalBindingException; 32 import org.objectweb.fractal.api.control.IllegalLifeCycleException; 33 34 38 public class OpenedSocketManagerMonoNotPersistentImpl extends AbstractComponent 39 implements 40 OpenedSocket 41 { 42 43 47 protected OpenedSocket delegateOpenedSocketItf; 48 49 53 56 public void openedSocket(SocketState socket) throws IOException , 57 InterruptedException 58 { 59 delegateOpenedSocketItf.openedSocket(socket); 60 socket.close(); 61 } 62 63 67 70 public String [] listFc() 71 { 72 return new String []{OpenedSocket.ITF_NAME}; 73 } 74 75 79 public void bindFc(String clientItfName, Object serverItf) 80 throws NoSuchInterfaceException, IllegalBindingException, 81 IllegalLifeCycleException 82 { 83 super.bindFc(clientItfName, serverItf); 84 if (clientItfName.equals(OpenedSocket.ITF_NAME)) 85 { 86 delegateOpenedSocketItf = (OpenedSocket) serverItf; 87 } 88 } 89 } | Popular Tags |