public void writeUTF(final String s) throws IOException { delegate.writeUTF(s); }
private static <T> void writeRawIdentifier(final EJBLocator<T> statelessLocator, final MessageOutputStream out) throws IOException { final String appName = statelessLocator.getAppName(); out.writeUTF(appName == null ? "" : appName); out.writeUTF(statelessLocator.getModuleName()); final String distinctName = statelessLocator.getDistinctName(); out.writeUTF(distinctName == null ? "" : distinctName); out.writeUTF(statelessLocator.getBeanName()); }
private void doWrite(final boolean available, final List<EJBModuleIdentifier> modules) { try (MessageOutputStream os = messageTracker.openMessageUninterruptibly()) { os.writeByte(available ? Protocol.MODULE_AVAILABLE : Protocol.MODULE_UNAVAILABLE); PackedInteger.writePackedInteger(os, modules.size()); for (EJBModuleIdentifier module : modules) { final String appName = module.getAppName(); os.writeUTF(appName == null ? "" : appName); final String moduleName = module.getModuleName(); os.writeUTF(moduleName == null ? "" : moduleName); final String distinctName = module.getDistinctName(); os.writeUTF(distinctName == null ? "" : distinctName); } } catch (IOException e) { // nothing to do at this point; the client doesn't want the response Logs.REMOTING.trace("EJB availability message write failed", e); } } }
public void clusterRemoval(final List<String> clusterNames) { try (MessageOutputStream os = messageTracker.openMessageUninterruptibly()) { os.writeByte(Protocol.CLUSTER_TOPOLOGY_REMOVAL); PackedInteger.writePackedInteger(os, clusterNames.size()); for (String clusterName : clusterNames) { os.writeUTF(clusterName); } } catch (IOException e) { // nothing to do at this point; the client doesn't want the response Logs.REMOTING.trace("EJB cluster message write failed", e); } }
public void clusterNodesRemoved(final List<ClusterRemovalInfo> clusterRemovalInfoList) { try (MessageOutputStream os = messageTracker.openMessageUninterruptibly()) { os.writeByte(Protocol.CLUSTER_TOPOLOGY_NODE_REMOVAL); PackedInteger.writePackedInteger(os, clusterRemovalInfoList.size()); for (ClusterRemovalInfo removalInfo : clusterRemovalInfoList) { os.writeUTF(removalInfo.getClusterName()); final List<String> nodeNamesList = removalInfo.getNodeNames(); PackedInteger.writePackedInteger(os, nodeNamesList.size()); for (String name : nodeNamesList) { os.writeUTF(name); } } } catch (IOException e) { // nothing to do at this point; the client doesn't want the response Logs.REMOTING.trace("EJB cluster message write failed", e); } } }
public void writeNoSuchMethod() { final String message = Logs.REMOTING.remoteMessageNoSuchMethod(methodLocator, identifier); try (MessageOutputStream os = messageTracker.openMessageUninterruptibly()) { os.writeByte(Protocol.NO_SUCH_METHOD); os.writeShort(invId); os.writeUTF(message); } catch (IOException e) { // nothing to do at this point; the client doesn't want the response Logs.REMOTING.trace("EJB response write failed", e); } finally { invocations.removeKey(invId); } }
public void writeSessionNotActive() { final String message = Logs.REMOTING.remoteMessageSessionNotActive(methodLocator, identifier); try (MessageOutputStream os = messageTracker.openMessageUninterruptibly()) { os.writeByte(Protocol.NO_SUCH_METHOD); os.writeShort(invId); os.writeUTF(message); } catch (IOException e) { // nothing to do at this point; the client doesn't want the response Logs.REMOTING.trace("EJB response write failed", e); } finally { invocations.removeKey(invId); } }
mos.writeByte(Protocol.LATEST_VERSION); StreamUtils.writePackedUnsignedInt31(mos, 1); mos.writeUTF("river"); } catch (InterruptedException e) { Thread.currentThread().interrupt();
public void clusterTopology(final List<ClusterInfo> clusterInfoList) { try (MessageOutputStream os = messageTracker.openMessageUninterruptibly()) { os.writeByte(Protocol.CLUSTER_TOPOLOGY_COMPLETE); PackedInteger.writePackedInteger(os, clusterInfoList.size()); for (ClusterInfo clusterInfo : clusterInfoList) { os.writeUTF(clusterInfo.getClusterName()); final List<NodeInfo> nodeInfoList = clusterInfo.getNodeInfoList(); PackedInteger.writePackedInteger(os, nodeInfoList.size()); for (NodeInfo nodeInfo : nodeInfoList) { os.writeUTF(nodeInfo.getNodeName()); final List<MappingInfo> mappingInfoList = nodeInfo.getMappingInfoList(); PackedInteger.writePackedInteger(os, mappingInfoList.size()); for (MappingInfo mappingInfo : mappingInfoList) { boolean is6 = mappingInfo.getSourceAddress() instanceof Inet6Address; if (is6) { PackedInteger.writePackedInteger(os, mappingInfo.getNetmaskBits() << 1); } else { PackedInteger.writePackedInteger(os, mappingInfo.getNetmaskBits() << 1 | 1); } os.write(mappingInfo.getSourceAddress().getAddress()); os.writeUTF(mappingInfo.getDestinationAddress()); os.writeShort(mappingInfo.getDestinationPort()); } } } } catch (IOException e) { // nothing to do at this point; the client doesn't want the response Logs.REMOTING.trace("EJB cluster message write failed", e); } }
public void clusterNewNodesAdded(final ClusterInfo clusterInfo) { try (MessageOutputStream os = messageTracker.openMessageUninterruptibly()) { os.writeByte(Protocol.CLUSTER_TOPOLOGY_ADDITION); PackedInteger.writePackedInteger(os, 1); os.writeUTF(clusterInfo.getClusterName()); final List<NodeInfo> nodeInfoList = clusterInfo.getNodeInfoList(); PackedInteger.writePackedInteger(os, nodeInfoList.size()); for (NodeInfo nodeInfo : nodeInfoList) { os.writeUTF(nodeInfo.getNodeName()); final List<MappingInfo> mappingInfoList = nodeInfo.getMappingInfoList(); PackedInteger.writePackedInteger(os, mappingInfoList.size()); for (MappingInfo mappingInfo : mappingInfoList) { boolean is6 = mappingInfo.getSourceAddress() instanceof Inet6Address; if (is6) { PackedInteger.writePackedInteger(os, mappingInfo.getNetmaskBits() << 1); } else { PackedInteger.writePackedInteger(os, mappingInfo.getNetmaskBits() << 1 | 1); } os.write(mappingInfo.getSourceAddress().getAddress()); os.writeUTF(mappingInfo.getDestinationAddress()); os.writeShort(mappingInfo.getDestinationPort()); } } } catch (IOException e) { // nothing to do at this point; the client doesn't want the response Logs.REMOTING.trace("EJB cluster message write failed", e); } }
public void writeNoSuchEJB() { final String message = Logs.REMOTING.remoteMessageNoSuchEJB(getEJBIdentifier()); try (MessageOutputStream os = messageTracker.openMessageUninterruptibly()) { os.writeByte(Protocol.NO_SUCH_EJB); os.writeShort(invId); os.writeUTF(message); } catch (IOException e) { // nothing to do at this point; the client doesn't want the response Logs.REMOTING.trace("EJB response write failed", e); } finally { invocations.removeKey(invId); } }
public void writeNotStateful() { final String message = Logs.REMOTING.remoteMessageEJBNotStateful(getEJBIdentifier()); try (MessageOutputStream os = messageTracker.openMessageUninterruptibly()) { os.writeByte(Protocol.EJB_NOT_STATEFUL); os.writeShort(invId); os.writeUTF(message); } catch (IOException e) { // nothing to do at this point; the client doesn't want the response Logs.REMOTING.trace("EJB response write failed", e); } finally { invocations.removeKey(invId); } }
out.writeUTF("river");
messageOutputStream.writeUTF(compositeName.toString());
messageOutputStream.writeUTF(NamingUtils.toCompositeName(name).toString());
messageOutputStream.writeUTF(NamingUtils.toCompositeName(name).toString());
messageOutputStream.writeUTF(NamingUtils.toCompositeName(name).toString()); try (Marshaller marshaller = createMarshaller(messageOutputStream, configuration)) { marshaller.writeObject(obj);
os.writeByte(Protocol.TXN_RECOVERY_REQUEST); os.writeShort(invocation.getIndex()); os.writeUTF(parentName); os.writeInt(flag); } catch (IOException e) {
public void writeWrongViewType() { final String message = Logs.REMOTING.remoteMessageBadViewType(getEJBIdentifier()); try (MessageOutputStream os = messageTracker.openMessageUninterruptibly()) { if (version >= 3) { os.writeByte(Protocol.BAD_VIEW_TYPE); os.writeShort(invId); os.writeUTF(message); } else { os.writeByte(Protocol.APPLICATION_EXCEPTION); os.writeShort(invId); final Marshaller marshaller = marshallerFactory.createMarshaller(configuration); marshaller.start(new NoFlushByteOutput(Marshalling.createByteOutput(os))); marshaller.writeObject(Logs.REMOTING.invalidViewTypeForInvocation(message)); marshaller.writeByte(0); marshaller.finish(); } } catch (IOException e) { // nothing to do at this point; the client doesn't want the response Logs.REMOTING.trace("EJB response write failed", e); } finally { invocations.removeKey(invId); } }